-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Migrate to twenty-ui - navigation/link #7837
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request migrates various link components to the 'twenty-ui' library across multiple files in the twentyhq/twenty repository. Here's a concise summary of the key changes:
- Updated import statements to use 'twenty-ui' for components like UndecoratedLink, ActionLink, RoundedLink, and Toggle
- Removed local imports for these components and replaced them with 'twenty-ui' imports
- Maintained existing functionality while standardizing UI components
- Minor adjustments to component usage and prop names in some cases
- Removed unnecessary React imports in some files
Key points to consider:
- Ensure consistent usage of 'twenty-ui' components across the codebase
- Review any TODO comments left in the code, particularly in PhoneDisplay.tsx
- Verify that all migrated components maintain their original functionality
- Consider updating documentation to reflect the new 'twenty-ui' usage
30 file(s) reviewed, 15 comment(s)
Edit PR Review Bot Settings | Greptile
@gitstart-twenty could you rebase this one? |
@gitstart-twenty I have rebased your PR, could you fix the stories |
@Devessier could you take a look at this branch (we actually have the problem on main but let's solve it here to avoid fixing conflicts)
The issue is that the click event is bubbled twice I guess the recommended way would be to remove the additional onClick on the row and to rely on labels. Curious to see how you would solve this |
Below, I list the things I asked myself or thought while reading the code:
<div class="relative">
<label for="autocreation">
Auto-creation
<span class="absolute inset-0"><span>
</label>
<!-- ... -->
<Toggle id="autocreation" />
</div> I would go with the latest solution, as shown here: 346433a. It works as expected: CleanShot.2024-10-22.at.16.17.58.mp4What is essential is that the label has a meaningful name. Using "Auto-creation" would be good. There are more evolved solutions, but I would only be willing to use them if I rely on an a11y library. These solutions are helpful when you want to build truly custom inputs. |
This PR was created by GitStart to address the requirements from this ticket: TWNTY-7535.
Description.
Migrate link components to
twenty-ui
Fixes #7535