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

updated * to itwinui 3 #141

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

nimam-bentley
Copy link
Contributor

@nimam-bentley nimam-bentley commented Jan 16, 2025

  • update itwinui versions in imodel-browser to latest 3.x
  • upgraded legacy props to components, including adding Tile.Action area
  • improves accessibility

UPDATE

  • updated all remaining packages to latest itwinui 3.x
  • ^ this broke a bunch of tests, most of the changes in this pr are now for fixing them
  • ^ part of this is updating @testing-library and adjusting some of the methods/locators

Note

would make some suggestions, pending state at merge, separate issues can be created

  • migrate from .iui- classes to itwinui components
  • use preferable locators [partially done in this pr]
  • shift test assertions of implementation details to user expectations, ensuring accessibility

@nimam-bentley nimam-bentley self-assigned this Jan 16, 2025
"@itwin/itwinui-icons-react": "^2.2.0",
"@itwin/itwinui-react": "^2.12.18",
"@itwin/itwinui-icons-react": "^2.9.0",
"@itwin/itwinui-react": "^3.16.5",
Copy link
Member

Choose a reason for hiding this comment

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

i think itiwnui would need to become a peer dep

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated all packages in monorepo

Copy link
Member

Choose a reason for hiding this comment

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

there should be no individual pnpm-lock file per pkg
this is a monorepo where they share a single lockfile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

? "#A47854" /** $iui-color-background-oak */
: "#4585A5" /** $iui-color-background-steelblue */
}
<Tile.Wrapper key={iTwin?.id} {...(tileProps ?? {})}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change will cause issue with anyone using the property overrides, as they used to be able to modifiy all the props through useIndidividualState, which infrastructure cloud use, and now we completely loose this ability, it is no longer possible to override anything in the tile, for example, if you want to add information to the bottom of the tile, or change the image to add a saved view drop down, that is no longer possible. I dont think this is a viable solution for this particular package.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or, if we really need thos, we need to take into account the tile props and redistribute them within this Tile.Wrapper elements as https://github.com/iTwin/iTwinUI/blob/5e310430f93094ff6aaa2bf1255d8a54cf5a103c/packages/itwinui-react/src/core/Tile/Tile.tsx#L544 is already doing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or, if we really need thos, we need to take into account the tile props and redistribute them within this Tile.Wrapper elements as iTwin/iTwinUI@5e31043/packages/itwinui-react/src/core/Tile/Tile.tsx#L544 is already doing.

I believe I did it in the same way, the remaining props are tileProps which are spread in the Tile.Wrapper component

@nimam-bentley nimam-bentley changed the title updated imodel-browser to itwinui 3 updated * to itwinui 3 Jan 24, 2025
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.

3 participants