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

fix: added ellipsis for long content in breadcrumb #6794

Merged
merged 8 commits into from
Jul 22, 2024

Conversation

TenzDelek
Copy link
Contributor

Description

added ellipsis for the long content in the breadcrumb to improve the layout shifting and in some case, breaking of the breadcrumb into next line.

Validation

before:
image

after:
image

Other Changes

  • Layout is shifted toward the left.

Related Issues

Fixes #6754

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@TenzDelek TenzDelek requested a review from a team as a code owner June 3, 2024 05:36
Copy link

vercel bot commented Jun 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jul 21, 2024 3:17pm

Copy link
Member

@ovflowd ovflowd left a comment

Choose a reason for hiding this comment

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

Alrighty, awesome contribution! Thanks for fixing this :)

@ovflowd ovflowd added the github_actions:pull-request Trigger Pull Request Checks label Jun 3, 2024
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Jun 3, 2024
Copy link
Contributor

github-actions bot commented Jun 3, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 93 🟢 100 🟢 96 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 96 🟢 91 🔗
/en/about/previous-releases 🟢 99 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 98 🟢 100 🟢 96 🟢 92 🔗

Copy link
Contributor

github-actions bot commented Jun 3, 2024

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.67% (593/654) 76.08% (175/230) 94.57% (122/129)

Unit Test Report

Tests Skipped Failures Errors Time
131 0 💤 0 ❌ 0 🔥 5.476s ⏱️

@ovflowd
Copy link
Member

ovflowd commented Jun 3, 2024

Can we update the code so that it attempts to use as much of the available width as possible?

image

As you can see on this screenshot, there's still available space 👀

@TenzDelek
Copy link
Contributor Author

Can we update the code so that it attempts to use as much of the available width as possible?

image As you can see on this screenshot, there's still available space 👀

hmm, seems interesting, in my viewport, the display is getting to it full. (maybe it depends on resolution of the screen)
image
what might be the appropriate length because for ellipsis to get trigger i believe we need a fix width (current implementation uses max-w-96 (384px)

@ovflowd
Copy link
Member

ovflowd commented Jun 3, 2024

Can we update the code so that it attempts to use as much of the available width as possible?

image

As you can see on this screenshot, there's still available space 👀

hmm, seems interesting, in my viewport, the display is getting to it full. (maybe it depends on resolution of the screen)

image

what might be the appropriate length because for ellipsis to get trigger i believe we need a fix width (current implementation uses max-w-96 (384px)

max-w-full should work? Which sets the width to 100%; You dont need to define a static width for ellipsis to work.

@TenzDelek
Copy link
Contributor Author

Can we update the code so that it attempts to use as much of the available width as possible?

image

As you can see on this screenshot, there's still available space 👀

hmm, seems interesting, in my viewport, the display is getting to it full. (maybe it depends on resolution of the screen)
image
what might be the appropriate length because for ellipsis to get trigger i believe we need a fix width (current implementation uses max-w-96 (384px)

max-w-full should work? Which sets the width to 100%; You dont need to define a static width for ellipsis to work.

the max-w-full doesn't seem to work. it is instead shifting the width further making the right panel smaller.
image
i believe from what i have seen, we are doing is making a fix length for a individual breaditem and applying the truncate to it. but what we oversight is that how we can make it truncate when it reaches the width like here the overall breadcrumb. (i hope this make sense haha)
i will again look into it and get back , thank you for pointing this out

@ovflowd
Copy link
Member

ovflowd commented Jun 3, 2024

Can we update the code so that it attempts to use as much of the available width as possible?

image

As you can see on this screenshot, there's still available space 👀

hmm, seems interesting, in my viewport, the display is getting to it full. (maybe it depends on resolution of the screen)
image
what might be the appropriate length because for ellipsis to get trigger i believe we need a fix width (current implementation uses max-w-96 (384px)

max-w-full should work? Which sets the width to 100%; You dont need to define a static width for ellipsis to work.

the max-w-full doesn't seem to work. it is instead shifting the width further making the right panel smaller. image i believe from what i have seen, we are doing is making a fix length for a individual breaditem and applying the truncate to it. but what we oversight is that how we can make it truncate when it reaches the width like here the overall breadcrumb. (i hope this make sense haha) i will again look into it and get back , thank you for pointing this out

Im pretty sure what Im referring to is possible, you might just need to investigate a bit more xD

@TenzDelek
Copy link
Contributor Author

hey @ovflowd
Following up on our discussion about the breadcrumb layout, I've implemented the suggested changes. However, I've encountered an issue where extensive text in the breadcrumb section seems to be causing the right panel to shrink in width rather than truncating with an ellipsis (...).
I suspect this might be related to the current grid layout settings. I have tried all the possibilities but was not able to come up with the solution haha, if possible can you give any possible solution that I might be oversighting ;)

@ovflowd
Copy link
Member

ovflowd commented Jun 4, 2024

hey @ovflowd Following up on our discussion about the breadcrumb layout, I've implemented the suggested changes. However, I've encountered an issue where extensive text in the breadcrumb section seems to be causing the right panel to shrink in width rather than truncating with an ellipsis (...). I suspect this might be related to the current grid layout settings. I have tried all the possibilities but was not able to come up with the solution haha, if possible can you give any possible solution that I might be oversighting ;)

Hi @TenzDelek, thanks for investigating! Unfortunately I don't have the time/capacity to look into this now, maybe someone from the Website team can? (cc @nodejs/nodejs-website)

@AugustinMauroy
Copy link
Member

@TenzDelek now it's not centered anymore
Capture d’écran 2024-06-04 à 11 35 12

@bmuenzenmeyer
Copy link
Collaborator

This PR will need to be rebased or recreated now that #6850 merged.

@ovflowd
Copy link
Member

ovflowd commented Jul 20, 2024

cc @TenzDelek could you please rebase your PR?

@TenzDelek
Copy link
Contributor Author

@ovflowd @bmuenzenmeyer can you check once if the pr is valid. this is my first time doing a git rebase. if any issue with this pr ,will close this and raise a new one.

@bmuenzenmeyer bmuenzenmeyer added the github_actions:pull-request Trigger Pull Request Checks label Jul 22, 2024
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Jul 22, 2024
@bmuenzenmeyer bmuenzenmeyer added this pull request to the merge queue Jul 22, 2024
Merged via the queue into nodejs:main with commit 22ebf9e Jul 22, 2024
14 checks passed
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.

Enhancement: Breadcrumb breakpoint
5 participants