-
Notifications
You must be signed in to change notification settings - Fork 318
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
[Dashboard] Remove <AspectRatio/> #4750
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4750 +/- ##
=======================================
Coverage 49.11% 49.11%
=======================================
Files 1052 1052
Lines 56786 56786
Branches 3889 3889
=======================================
Hits 27892 27892
Misses 28261 28261
Partials 633 633
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
@@ -1,4 +1,3 @@ | |||
import { AspectRatio } from "@/components/ui/aspect-ratio"; |
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.
@jnsdls I didn't know there was another AspectRatio so I mistakenly removed this one. And now the lint is telling me due to this change, @radix-ui/react-aspect-ratio
is no longer being used.
So, should we remove said dependency, or use in as the replacement for all the Chakra-ui's AspectRatio?
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.
(I have a feeling you would want to remove the dep)
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.
@MananTank had thoughts on this last time it came up, will have him make the decision on what we do here, but either way it's either we use css or we use the component, we have to pick one of the options, not both
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.
We can replace all AspectRatio components with CSS/tailwind class but my only concern is that it's not a an exact replacement, (I've seen this when I refactored the FileInput component - I had to make some other changes to make the aspect-ratio work exactly as chakra version ).
Lets verify that all changes are working as expected and we are not accidentally breaking the layout. If they are are - feel free to remove all the components with css class
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.
@MananTank yeah it's not working exactly the same you're right. I had to make few minor changes to re-align the inner content (re-center, more like).
I guess that means we stick with @radix-ui/react-aspect-ratio
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.
Let's replace the instances where it works with just a css class and make changes in other places as needed and remove AspectRatio component
8bfb427
to
753e22c
Compare
753e22c
to
65875bd
Compare
62ce907
to
3eef910
Compare
820183c
to
4da40f1
Compare
4da40f1
to
0eac344
Compare
0eac344
to
ce7d11d
Compare
ce7d11d
to
ca08be8
Compare
ca08be8
to
28f128d
Compare
Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR focuses on removing the
AspectRatio
component from various files and replacing its usage withdiv
elements styled with Tailwind CSS classes to achieve the same aspect ratio effect.Detailed summary
AspectRatio
imports from multiple components.AspectRatio
usage withdiv
elements using Tailwind CSS classes for aspect ratios.AspectRatio
.