Skip to content

fix(#2433): make copy link & toc items to handle tab position#349

Merged
chrisolsen merged 1 commit into
alphafrom
vanessa/tabs-urls-2443
May 1, 2025
Merged

fix(#2433): make copy link & toc items to handle tab position#349
chrisolsen merged 1 commit into
alphafrom
vanessa/tabs-urls-2443

Conversation

@vanessatran-ddi
Copy link
Copy Markdown
Collaborator

@vanessatran-ddi vanessatran-ddi commented Apr 30, 2025

What I have changed:

  • Make all tabs to have initialTab as 1 so when we land on the page, first tab will be highlighted

Before:
image

After:
image

  • Make the navigation right hand side navigate to the correct position (especially if you refresh the browser, 2nd tab (Code examples) will be opened, and scroll down to the example

Before:
image
(No tab position on the browser, so if you refresh it will come back to the first tab)

After:
image

It has the tab position on the browser, refresh it, it will open the tab 2 and navigate to the example (refer story #2433 GovAlta/ui-components#2433)

  • Update the logic of "Copy link"
    Before:
image will return : {URL}/components/v6.0.0+-react/accordion#hide-and-show-many-sections-of-information-(faq) (without tab position so when you open a new tab and paste the link, it doesn't open 2nd tab (code examples) and scroll to the correct position)

After:
{URL}/components/accordion#tab-1#hide-and-show-many-sections-of-information-(faq)
It will return as above.

@vanessatran-ddi vanessatran-ddi linked an issue Apr 30, 2025 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 30, 2025

Deploy Preview for abgov-ui-component-docs ready!

Name Link
🔨 Latest commit 5e8efdb
🔍 Latest deploy log https://app.netlify.com/sites/abgov-ui-component-docs/deploys/68123c398611ff0008730e12
😎 Deploy Preview https://deploy-preview-349--abgov-ui-component-docs.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.

@vanessatran-ddi
Copy link
Copy Markdown
Collaborator Author

Hi @syedszeeshan Can you help me test this PR?
Hi @twjeffery I fixed the tabs URL issue. Can you help me check the docs site, especially Copy link feature that you had before.

@syedszeeshan
Copy link
Copy Markdown
Collaborator

image

Test passed.

Copy link
Copy Markdown
Collaborator

@twjeffery twjeffery left a comment

Choose a reason for hiding this comment

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

Working great for me now

Screen.Recording.2025-04-30.at.4.04.00.PM.mov

@vanessatran-ddi
Copy link
Copy Markdown
Collaborator Author

Hello @chrisolsen I got 2 approvals and it is good to be in the final code review.

@chrisolsen chrisolsen merged commit 5c1b848 into alpha May 1, 2025
7 checks passed
@chrisolsen chrisolsen deleted the vanessa/tabs-urls-2443 branch May 1, 2025 15:38
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.

Tabs: URL issues

4 participants