Skip to content

V1.0.0 A smaller, smooter, cleaner, clearer framework#23

Merged
ponsoc merged 63 commits into
mainfrom
v1.0.0
Mar 6, 2026
Merged

V1.0.0 A smaller, smooter, cleaner, clearer framework#23
ponsoc merged 63 commits into
mainfrom
v1.0.0

Conversation

@ponsoc

@ponsoc ponsoc commented Jan 2, 2026

Copy link
Copy Markdown
Owner

Partially rewritten the framework to reduce its footprint and make object creation more intuitive. Editor and debugger support has been improved, making development smoother and more productive. The router system has also been greatly enhanced, now supporting conditional routes directly within the framework, giving you more control over navigation and layout rendering.

Todo:

  • Update tests

@Jamiefaber Jamiefaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once logging in the setupflow prints and when i log in a gain the setupflow doesnt print anymore, works correctly

Comment thread example/src/components/login_dialog.py Outdated
self.password = st.text_input("Password", type="password")
if st.button("Login", use_container_width=True):
self.login_flow.dispatch()
self.login_flow.dispatch() # via on click, doe hij dan wel een rerun/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed>

Comment thread example/src/main.py Outdated

self.app = StSteroids()

# self.app.on_app_run_once(self.setup_flow)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread src/ststeroids/main.py Outdated
"""
self._routes[route.name] = route

def on_app_run_once(self, callback: Flow):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc string + typehint

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread example/src/layouts/dashboard.py Outdated
)

if st.button("logout"):
del st.session_state["store"]["access_token"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After pressing the log out button no login screen appears until I click somewhere else. An st.rerun would fix this for example.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread README.md Outdated
Registers a layout or page as a route in your app.
- name is the route identifier
- layout is the layout class or callable to render when this route is selected
Registers a route that maps a route name to a layout class .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registers a route that maps the route name to a layout class. space between point are class and the route name instead of a route name, reads nicer and name is an identifier right

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@Jamiefaber Jamiefaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly spell check and documentation formatting. One comment about the app_setup flow which needs to be made sure that that is working as intended. Lastly, I also have comments on code which isn't new code, I think you didn't see them because of that. I also wasn't able to resolve my comments, so consider the comments you have replied to as resolved

Comment thread README.md Outdated
Component concepts:

- components never decide on domain logic, so no domain error handeling for example
- a component contains interaction elements, unless

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

components contain interaction elements, unless:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread README.md Outdated

- components never decide on domain logic, so no domain error handeling for example
- a component contains interaction elements, unless
- the component is still meaningful and usable without a the interaction element → split the element out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the component is still meaningful and usable without the interaction element → split the element out

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread README.md Outdated
- components never decide on domain logic, so no domain error handeling for example
- a component contains interaction elements, unless
- the component is still meaningful and usable without a the interaction element → split the element out
- a component doesn't navigate pages

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

components don't navigate pages

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread README.md Outdated
- a component contains interaction elements, unless
- the component is still meaningful and usable without a the interaction element → split the element out
- a component doesn't navigate pages
- should have methods for updating it's attributes (explicit state changes) (so that the flow doesn't need to all the attributes)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should have methods for updating its attributes (this makes explicit state changes possible, so that the flow doesn't need to have all the attributes)

Comment thread README.md Outdated
- Flows coordinate multiple components and stores as part of a single interaction
- Flows determine navigation and control flow between layouts or pages
- Flows own error handling and recovery logic for the interactions they manage
- Flows may contain light business rules, but core domain logic should live in services

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bullet points here all start with Flow with a capital F, above and below the component and layout start with lowercase letter. Make sure it is uniform, suggest starting with capitals and ending with dots

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, well catched>

Comment thread src/ststeroids/router.py Outdated
class Router:
"""
A routing system for Streamlit applications, allowing navigation between different pages.
A routing system for the framework, allowing navigation between different layouts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing attributes

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Comment thread src/ststeroids/store.py
@@ -13,14 +13,13 @@ class Store:
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Store doc string has param, whereas it should be formatted as attributes

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/ststeroids/store.py
"""

def __init__(self, store_name: str):
"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this docstring removed?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread src/ststeroids/store.py
class ComponentStore(Store):
"""
Class that creates a component session store. This can be passed to component instances.
Class that creates a component session store.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing attributes?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread src/ststeroids/style.py
@@ -15,7 +15,7 @@ def __init__(self, style_file: str):
"""
self.style_file = style_file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name style file as attribute in the class doc string

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done>

@Aschwinvo

Copy link
Copy Markdown

A smaller, SMOOTHER, cleaner, clearer framework

Comment thread src/ststeroids/component.py Outdated
):
) -> None:
"""
Executes the render method implemented in the subclasses, additionaly providing extra configuration based on the `render_as` parameter

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

render_as removed.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

from .flow import Flow


class RouteBuilder:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing example where Routebuilder usage is shown, specifically the on_enter functionallity

@ponsoc

ponsoc commented Feb 6, 2026

Copy link
Copy Markdown
Owner Author
  • no positional argument?

@ponsoc ponsoc marked this pull request as ready for review March 6, 2026 12:02
@ponsoc ponsoc merged commit 9c897cf into main Mar 6, 2026
3 checks passed
@ponsoc ponsoc deleted the v1.0.0 branch March 6, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants