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

Allow to add sections to layouts for convenience #579

Closed
Kaliumhexacyanoferrat opened this issue Dec 9, 2024 · 0 comments · Fixed by #597
Closed

Allow to add sections to layouts for convenience #579

Kaliumhexacyanoferrat opened this issue Dec 9, 2024 · 0 comments · Fixed by #597
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Kaliumhexacyanoferrat
Copy link
Owner

As a developer, I would like to easily add sections to my app without the need of creating a layout myself, so my code is cleaner and easier to read.

Example

Instead of

var api = Layout.Create();

var app = Layout.Create()
                .Add("api", api);

we could do

var app = Layout.Create();

var api = app.AddSegment("api");

Should also work for multiple segments:

var app = Layout.Create();

var api = app.AddSegment([ "api", "v1" ]);

Acceptance criteria

  • The functionality is implemented as an extension on the LayoutBuilder in the Layouting module
  • The feature is documented on the GenHTTP website
  • The feature is covered by acceptance tests
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added enhancement New feature or request good first issue Good for newcomers labels Dec 9, 2024
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat linked a pull request Dec 16, 2024 that will close this issue
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added this to the Version 9.4 milestone Dec 17, 2024
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat self-assigned this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant