Skip to content

Conversation

@XiangyuShen
Copy link
Contributor

What: Closes #8039
Convert Tile examples to TypeScript

Additional issues:

@patternfly-build
Copy link
Collaborator

patternfly-build commented Sep 22, 2022

Copy link
Contributor

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

Hi @XiangyuShen , thank you for your contribution! The tile conversions look awesome! 🎉

I am noticing we have a couple of existing bugs in our Tile docs. They are small, easy to fix, and would be great to squash in this PR before we merge it! Would you be willing to help us make those changes?

  1. On line 14 of Tile.md, we need to change
Keyboard interaction patterns and a11y is implemented in the Tile demos, located in the [Demo section](/documentation/react/demos/tiledemo).

to

Keyboard interaction patterns and a11y is implemented in the Tile demos, located in the [Demo section](/components/tile/react-demos).

This will fix the current 404 error with the URL.

  1. I also noticed an existing bug in our demos... link to the TileDemo.md file.
    The isSelected functionality isn't working properly because the string passed in does not match the existing id prop that is set on Tile.

To fix the select logic, we need to make sure they match. E.g. on line 30 of TileDemo.md, change the value for isSelected to be:
isSelected={selectedId === 'single-select-tile-1'}

...and do that for the other three tiles in the demo!

In the Multiple Select demo, we should make sure the .includes param also matches the id.

E.g.:

        isSelected={selectedIds.includes('multiselect-tile-1')}

... and so forth for the remaining 3 tiles!

Just those two quick updates - otherwise LGTM!

Copy link
Contributor

@jenny-s51 jenny-s51 left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

LGTM! 🥳

@nicolethoen nicolethoen merged commit 2882ec6 into patternfly:main Sep 26, 2022
@XiangyuShen XiangyuShen deleted the chore/convert-tile-examples-to-ts branch September 26, 2022 13:26
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • @patternfly/react-catalog-view-extension@4.92.10
  • @patternfly/react-code-editor@4.82.10
  • @patternfly/react-console@4.92.10
  • @patternfly/react-core@4.242.5
  • @patternfly/react-docs@5.102.12
  • @patternfly/react-inline-edit-extension@4.86.10
  • demo-app-ts@4.201.10
  • @patternfly/react-log-viewer@4.87.5
  • @patternfly/react-table@4.110.10
  • @patternfly/react-topology@4.88.10
  • @patternfly/react-virtualized-extension@4.88.10

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.

Tile: convert examples to TypeScript

4 participants