-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat[#50499]: Add back button and breadcrumbs to page header #45
Conversation
🦋 Changeset detectedLatest commit: 6ce609d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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! 🎉 I left a few remarks but would leave to @HDinger for final approval 🥇
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 👍 I have some remarks in the code, some of them we might want to discuss.
- Further I noticed that the arrow is not correctly aligned with the header text:
- At least some of the CI failures are due to missing specs. So please add tests for the newly added features. You can add them here. Let me know, if you need help with the other failing tests.
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.
Nice job, I only have minor remarks. 👍 Further @bsatarnejad noticed that on mobile the text is not wrapping correctly around the arrow:
I'd expect the arrow to stay on the right side, and the text to wrap after it. What do you think?
Hi @HDinger, I had to change the HTML structure in the PageHeader to achieve this result, which resulted also in CSS changes. Please have a look and let me know if it is ok to have a div in the template. While I was changing the CSS I saw that the order attributes could be removed now. Please double check this too, maybe I am missing something. |
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.
I had to change the HTML structure in the PageHeader to achieve this result, which resulted also in CSS changes. Please have a look and let me know if it is ok to have a div in the template.
That is totally okay 👍
While I was changing the CSS I saw that the order attributes could be removed now. Please double check this too, maybe I am missing something.
Yes, seems to work fine 👍
The component looks good to me. I have some minor remarks with regards to the preview.
Further, I had a look on the figma specification and saw that there are some special mobile styles: The back button is hidden, as well as the breadcumb and a different navigation element is shown. In Primer, this is named the context bar of the page header. We can add that in a separate PR to get this one done, but need to keep in mind, that we hide the backButton and breadcrumbs.
previews/primer/open_project/page_header_preview/actions.html.erb
Outdated
Show resolved
Hide resolved
Hi @HDinger After I added the new parameters to the playground I saw a small misalignment: Also, thank you for all your input! |
Yeah, I would like to have that solved. I can support you with this, if you like. |
…misalignment which we have to cancel out. This is most likely coming from the arrow being thinner than the font
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.
Good to merge 👍 Thanks for all the effort @dominic-braeunlein !
Uh oh! @dominic-braeunlein, the image you shared is missing helpful alt text. Check your pull request body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
1 similar comment
Uh oh! @dominic-braeunlein, the image you shared is missing helpful alt text. Check your pull request body. Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
Work package: https://community.openproject.org/wp/50947
Needed for implementing: https://community.openproject.org/wp/50499
Related PR in OP: opf/openproject#13962
What are you trying to accomplish?
This PR adds breadcrumbs and back button support to the PageHeader.
A breadcrumbs item can be:
{href: "/admin", text: "Admin" }
.breadcrumb_paths
method inBreadcrumbHelper
e.g."\u003ca href=\"/root/sub\"\u003eSub\u003c/a\u003e"
."Page 2"
This feature also adds an optional
show_breadcrumb
parameter to deactivate rendering of the breadcrumbs. Which helps harmonisation with the existingBreadcrumbHelper
#show_local_breadcrumb
control method to maintain backwards compatibility.e.g.
Screenshots
List the issues that this change affects.
https://community.openproject.org/wp/50499
Risk Assessment
What approach did you choose and why?
Anything you want to highlight for special attention from reviewers?
Accessibility
Merge checklist