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

Tabs for the new Display Package page redesign #8625

Merged
merged 7 commits into from
Jun 11, 2021
Merged

Conversation

sophiamfavro
Copy link
Contributor

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:
image

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.
image
image

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

@sophiamfavro sophiamfavro requested a review from a team as a code owner June 8, 2021 00:21
@@ -334,6 +334,11 @@ img.reserved-indicator-icon {
.sortable {
cursor: pointer;
}
@media (max-width: 767.9px) {
.hidden-xs {
display: none !important;
Copy link
Contributor

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.

Copy link
Contributor Author

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

@zhhyu
Copy link
Contributor

zhhyu commented Jun 10, 2021

I think we may need to polish the accessibility later, but it's out of scope of this PR.

Copy link
Contributor

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 🚀

@sophiamfavro sophiamfavro merged commit 0f21ebd into dev Jun 11, 2021
@joelverhagen joelverhagen deleted the sofavroV2Tabs branch August 22, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants