-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add dynamic html id to Matestack pages #551
Add dynamic html id to Matestack pages #551
Conversation
Hey @marcosvafilho! Thank you so much for your PR! We're currently about to define the branching workflow, it's not properly set up right now. So no worries about the branch ;) I will create a "next_release" branch from the main branch and will target your PR to that branch then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! As said before, we just need a little spec covering this feature :)
Love to see this implemented! |
Hey guys, I'll happily add tests :) |
And maybe a small hint&example about this behavior somewhere in the matestack-pages docs? As you already said the generated IDs could help with styling and testing so ppl should be able to find it in the documentation 🤓 |
Added both tests and documentation reference. |
Changes look very good to me, needs approval by @jonasjabari to get it merged though ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff!
Hey @marcosvafilho I need to revert this PR as discussed in #554. I want to do a release today (2.1) and therefore need to get rid of the issue which was introduced in this PR (sorry for overseeing it while reviewing). Once the issue is resolved, I happily merge this PR again and release this feature within the next release (2.2) :) If you need any help fixing the bug (see #554), let me know! Cheers, Jonas |
No problem :) I'll work on the other PR later this week :) |
Issue #435: Add dynamically generated page-content-name id/class
As pointed by @pascalwengerter on issue #435, it would be nice to have a dynamic
id
attribute on theMatestack::Ui::Core::Page
root element, allowing us to style pages without adding a wrapping element, and directly target theid
attribute with CSS rules instead.This PR is an attempt to bring such improvement. Let me know if it's good enough, otherwise I can work to make it better with your feedback/input.
Changes
page_id
method to build a html id string fromcontroller
andaction
values provided byparams
.page_id
method to populate theid
argument withindiv
helpers used insideMatestack::Ui::Core::Page
.Notes
dasherize
to comply with the CSS naming pattern already in place.develop
branch, but it looks like it doesn't exist anymore. Excuse me if I'm making a mistake by opening a PR to themain
branch instead.closes #435