Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layouts #90

Open
ZeroIntensity opened this issue Nov 25, 2023 · 1 comment
Open

Layouts #90

ZeroIntensity opened this issue Nov 25, 2023 · 1 comment
Labels
api This has to do with the Python API (view) improvement Improvement to an existing feature
Milestone

Comments

@ZeroIntensity
Copy link
Owner

Feature description

On top of the current component API, a layout system should be implemented. This will be waiting on #12, #83, and #44.

Feature example API

from view import layout, page, h1, new_app

app = new_app()

@app.layout  # or @layout, which will be handled by the loader
async def lay(content: DOMNode | str):
    return page(content)

@app.get("/")
async def index():
    return h1("Hello, view.py!")

# OR

@index.layout
async def lay(content: DOMNode | str):
    return page(content)

app.run()

Anything else?

No response

@ZeroIntensity ZeroIntensity added improvement Improvement to an existing feature api This has to do with the Python API (view) delayed Delayed due to another issue labels Nov 25, 2023
@ZeroIntensity
Copy link
Owner Author

This should also include some metadata utilities.

@ZeroIntensity ZeroIntensity added this to the Beta milestone May 7, 2024
@ZeroIntensity ZeroIntensity removed delayed Delayed due to another issue labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api This has to do with the Python API (view) improvement Improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant