Skip to content

removed ghost "Show component code" button#3078

Merged
thompsongl merged 2 commits intoelastic:masterfrom
anishagg17:view
Mar 18, 2020
Merged

removed ghost "Show component code" button#3078
thompsongl merged 2 commits intoelastic:masterfrom
anishagg17:view

Conversation

@anishagg17
Copy link
Copy Markdown
Contributor

Summary

Fixes: #696

"ghost" Show Component Code button is removed, on first tab "Show component code" but is active

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples
- [ ] Added or updated jest tests
- [ ] Checked for breaking changes and labeled appropriately

  • Checked for accessibility including keyboard-only and screenreader modes
    - [ ] A changelog entry exists and is marked appropriately

@kibanamachine
Copy link
Copy Markdown

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Comment on lines +44 to +46
<EuiButton>
<Link to={componentLinkTo}>View component code</Link>
</EuiButton>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nesting a link inside a button is about the same as nesting a button inside a link so I'm afraid this doesn't really solve the problem...

Maybe the EUI team has some guidance on how to use react-router with EuiButton?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've added a discussion item for our Tuesday weekly since I've run into this in consuming apps as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@anishagg17
Copy link
Copy Markdown
Contributor Author

Now the highlighting goes away

Screenshot 2020-03-18 at 2 55 56 PM

as it was before

Screenshot 2020-03-18 at 2 56 43 PM

@cchaos
Copy link
Copy Markdown
Contributor

cchaos commented Mar 18, 2020

Jenkins, test this

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_3078/

@cchaos cchaos requested a review from thompsongl March 18, 2020 14:12
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Can you try this technique of using React router with EuiButton?

This would be the ideal method, but we don't actually have the requisite services as part of the EUI docs site (🤷‍♂)

As is, this PR will work. I can do a follow-up PR to introduce the necessary routing services to allow for accessing getRouterLinkProps

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.

[Docs] "Show Component Code" Button is Read Twice by Screen Reader

5 participants