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

feat(tabs): added hover and active styles #16523

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

soumyaraju
Copy link
Contributor

@soumyaraju soumyaraju commented May 21, 2024

Part of #15961

It adds the active and hover states to the line and contained scrollable icon buttons and also fixes the Background missing on left scroll button for line tabs.

Rest of the issues mentioned are handled in a different PR #16522

Changelog

New

Screenshot 2024-05-21 at 7 51 55 PM Screenshot 2024-05-21 at 7 50 25 PM

Testing / Reviewing

Copy link
Contributor

github-actions bot commented May 21, 2024

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

@soumyaraju
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

Copy link

netlify bot commented May 21, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6e8c6e4
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/664cac3f9e4c5f0008268744
😎 Deploy Preview https://deploy-preview-16523--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 21, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 6e8c6e4
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/664cac3fc7b1230008bf62cb
😎 Deploy Preview https://deploy-preview-16523--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@soumyaraju soumyaraju marked this pull request as ready for review May 21, 2024 14:25
@soumyaraju soumyaraju requested a review from a team as a code owner May 21, 2024 14:25
Copy link

netlify bot commented May 21, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit e817c9f
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/670527e2f6bd48000834ff6c
😎 Deploy Preview https://deploy-preview-16523--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 21, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit e817c9f
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/670527e20b6f0e00082adac8
😎 Deploy Preview https://deploy-preview-16523--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@soumyaraju
Copy link
Contributor Author

recheck

1 similar comment
@soumyaraju
Copy link
Contributor Author

recheck

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Hover states look good. I see you added the active styling but for some reason the active styling is not applied when clicking down and holding the mouse down. You can see here I toggle the active styling on and it's correct, but when I click and hold to scroll it doesn't change from the hover styling:

CleanShot.2024-06-17.at.11.47.33.mp4

@tay1orjones
Copy link
Member

The contained tabs have the same issue. There's something odd going on with the gradient. I'm not sure if it's related to your changes or not, but holding down the right arrow a second time after it's already scrolled all the way to the right makes it go backwards the other way.

CleanShot.2024-06-17.at.11.51.01.mp4

You might consider moving these changes into #16522 (review) or moving those changes into this PR so we can make sure it's fully correct with all these changes together.

@tay1orjones
Copy link
Member

@soumyaraju any thoughts on my thoughts in my previous comment?

@soumyaraju
Copy link
Contributor Author

Hover states look good. I see you added the active styling but for some reason the active styling is not applied when clicking down and holding the mouse down. You can see here I toggle the active styling on and it's correct, but when I click and hold to scroll it doesn't change from the hover styling:

CleanShot.2024-06-17.at.11.47.33.mp4

Hi @tay1orjones i have corrected the active style for the tabs, could you please check it. Thanks

@tay1orjones
Copy link
Member

@soumyaraju active styles look good, the scroll is still not properly working at the rightmost end of the tab list. The final tab is obscured and can't be viewed.

2024-08-06.at.08.31.18-Components.Tabs.-.Default.Storybook-Google.Chrome.mp4

@tay1orjones
Copy link
Member

@soumyaraju I redeployed the deploy preview with the latest from main, unfortunately the issue remains where the last tab is being partially hidden. I can't reproduce the issue in the production storybook at react.carbondesignsystem.com, so it must be related to something here. My guess is it's a result of the removing of position: absolute; on the buttons.

@soumyaraju
Copy link
Contributor Author

@tay1orjones i have added the fix to the above issue, could you please re-check. Thanks

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.08%. Comparing base (9861873) to head (e817c9f).
Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16523   +/-   ##
=======================================
  Coverage   77.08%   77.08%           
=======================================
  Files         409      409           
  Lines       14024    14024           
  Branches     4355     4307   -48     
=======================================
  Hits        10810    10810           
  Misses       3044     3044           
  Partials      170      170           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Functionality looks great, thanks!

@tay1orjones tay1orjones requested review from a team and aagonzales and removed request for a team September 23, 2024 19:55
Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

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

I'm seeing some issues with the left arrow on hover and active. The background is not a uniformed color.
Sep-24-2024 16-22-20

@soumyaraju
Copy link
Contributor Author

soumyaraju commented Sep 25, 2024

Hi @aagonzales, thank you for your review! The background color fade you mentioned has been addressed in another PR : #16522., which I added in the PR description.

@aagonzales
Copy link
Member

@soumyaraju Ok without that fixed its hard to tell if this version is correct. Perhaps we need to wait until that PR is merged so we can see those changes here. I would not want to merge this glitch in as it is now. @tay1orjones thoughts on merge order?

image

@soumyaraju
Copy link
Contributor Author

Hi @aagonzales @tay1orjones i have rebased and verified the background color fade you mentioned, its removed. Could you re-review this pr and approve my changes. Thanks.

@alisonjoseph
Copy link
Member

@aagonzales the other PR (#16522) has been merged and both set of changes should be visible here for you to re-review.

Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

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

Yup, everything looks good now! Thanks for fixing all of that.

@soumyaraju
Copy link
Contributor Author

Thanks @aagonzales for the review, @alisonjoseph could you help me merge these changes. TIA

@tay1orjones tay1orjones enabled auto-merge October 9, 2024 14:50
@tay1orjones tay1orjones added this pull request to the merge queue Oct 10, 2024
Merged via the queue into carbon-design-system:main with commit 37907de Oct 10, 2024
36 checks passed
annawen1 pushed a commit to annawen1/carbon that referenced this pull request Oct 11, 2024
* feat(tabs): added hover and active styles

* feat(tabs): revert test style

* feat(tabs): active tab style order fix

* feat(tabs): issue fix :last tab is being partially hidden

* feat(tabs): issue fix :last tab is being partially hidden

* feat(tabs): added to contributors list

* feat(tabs): rebase

---------

Co-authored-by: Soumya Raju <[email protected]>
Co-authored-by: Alison Joseph <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants