-
Notifications
You must be signed in to change notification settings - Fork 641
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
Tabs for the new Display Package page redesign #8625
Conversation
@@ -334,6 +334,11 @@ img.reserved-indicator-icon { | |||
.sortable { | |||
cursor: pointer; | |||
} | |||
@media (max-width: 767.9px) { | |||
.hidden-xs { | |||
display: none !important; |
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.
Is it expected that we introduce this change? My apologies that I am not a less/css expert.
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.
This file is auto-generated by grunt. To be honest, it is not clear why grunt chose to add this now, but it seems to be okay regardless. I tried deleting the file and running grunt again to recreate it and it gets added every time
I think we may need to polish the accessibility later, but it's out of scope of 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.
Great work! 🚀
Solution
I used bootstrap to created tabs to match the new redesign. The tabs were made sticky the same way that the installation tabs are by adding code in the .js file that saves the last tab clicked onto local storage. For styling, I went into the .less file and added the blue bar at the bottom of the clicked on tab and added padding to keep the distance of the tab content to the tabs consistent for each content. The final now looks like this:
Mobile
The mobile is still a work in progress as we are finalizing how we want it to look to keep the experience just as strong as it will be on desktop. All the features and experiences are the same currently and the only issue is the tabs in the bottom row get pushed if a tab in the top row is clicked(see picture below). We decided to punt this as we have a work item(#8611) for mobile and want to wait until the redesign is finalized to make changes.
Testing
To test my solution I tested all the links on both the new page and old page to make sure that it all worked correctly. I then inspected the page and looked at the console to make sure that there were no errors in the .js file. I also double checked that the sticky tabs worked by reloading the page, going to a different package, and seeing that the correct value was being stored in local storage. Finally, to make sure that the page worked on deleted and unlisted packages I deleted and unlisted packages in my local enviroment. I then looked at them to make sure that only the used by and versions tabs were shown to match what we currently do on the old page.
If you have any questions feel free to reach out