Skip to content

Conversation

@redallen
Copy link
Contributor

@redallen redallen commented Jun 19, 2019

What: Fixes #2303 for a Switch by conditionally adding data-ouia-component-type and data-ouia-component-id for Switch based on window.localStorage['ouia']. Do not merge until some further discussion takes place on #2303 .

Edit: Discussion has taken place, we can merge now.

Additional issues:

@redallen redallen changed the title feat(react-core): add ouia compatibility to Switch POC: feat(react-core): add ouia compatibility to Switch Jun 19, 2019
@redallen redallen self-assigned this Jun 19, 2019
@patternfly-build
Copy link
Collaborator

PatternFly-React preview: https://patternfly-react-pr-2304.surge.sh

@quarckster
Copy link
Contributor

quarckster commented Jun 20, 2019

thanks @redallen I couldn't test changes of this PR in https://patternfly-react-pr-2304.surge.sh/. I set a localStorage variable window.localStorage.setItem("ouia", true), refreshed the page but nothing changed in the DOM. I couldn't find data-ouia attributes. On the other hand, it works if you build PR locally, it was tested by @karelhala

@redallen
Copy link
Contributor Author

@quarckster Gatsby statically renders the site without window defined, so after you set the localStorage variable you have to interact with the switch to cause it to re-render, then you'll see the tags. Sorry, that's a caveat I forgot to mention.

@redallen
Copy link
Contributor Author

After discussion with the OUIA team, this PR is good to merge and have many more followups for all our components that would want integration testing.

@tlabaj tlabaj requested review from dlabaj and jschuler June 25, 2019 19:05
@dlabaj dlabaj removed their assignment Jun 27, 2019
@dgutride dgutride changed the title POC: feat(react-core): add ouia compatibility to Switch feat(react-core): add ouia compatibility to Switch Jun 28, 2019
dgutride
dgutride previously approved these changes Jun 28, 2019
@dgutride dgutride self-assigned this Jun 28, 2019
karelhala
karelhala previously approved these changes Jul 1, 2019
@redallen redallen dismissed stale reviews from karelhala and dgutride via f759923 July 3, 2019 17:24
@redallen
Copy link
Contributor Author

redallen commented Jul 3, 2019

@dgutride @karelhala Fixed merge conflicts, please re-approve!

jschuler
jschuler previously approved these changes Jul 5, 2019
@jschuler jschuler merged commit 2cc4d48 into patternfly:master Jul 8, 2019
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • @patternfly/react-core@3.63.0
  • @patternfly/react-docs@4.8.61
  • @patternfly/react-inline-edit-extension@2.9.24
  • demo-app-ts@2.5.2
  • @patternfly/react-table@2.13.55
  • @patternfly/react-topology@2.5.5
  • @patternfly/react-virtualized-extension@1.1.57

Thanks for your contribution! 🎉

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.

Add Custom Data-Attributes to Components for OUIA Compatibility

7 participants