-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added custom size and Default widget open in <DocsGPTWidget /> #1389
Conversation
@ayaan-qadri is attempting to deploy a commit to the Arc53 Team on Vercel. A member of the Team first needs to authorize it. |
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.
@ayaan-qadri
Other components using WidgetProps won't align with the custom object for size
Size is ideally string in the min-width and height
So I'm making changed into height and width of prompt window only, If we make those styled-component size prop's type string (as it was before) so it throws Linting error In my opinion, making size prop compatible custom object is more reliable and future proof as well: (Lemme know your thoughts that what should we do for this as if the current implementation does not fits code style) |
@@ -265,7 +295,7 @@ const DotAnimation = styled.div` | |||
const Delay = styled(DotAnimation) <{ delay: number }>` | |||
animation-delay: ${props => props.delay + 'ms'}; | |||
`; | |||
const PromptContainer = styled.form<{ size: string }>` |
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.
@ayaan-qadri I was thinking if you could just replace the need of passing the sizes to different styled components.
Having an object of dimensions for small, medium, large and the custom.
So that the width, height could be controlled from the parent directly.
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.
Now we can control dimensions from sizesConfig.
@ManishMadan2882 Please give me some time, I will sure look into this. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…om) from one point
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1389 +/- ##
=======================================
Coverage 34.05% 34.05%
=======================================
Files 69 69
Lines 3374 3374
=======================================
Hits 1149 1149
Misses 2225 2225 ☔ View full report in Codecov by Sentry. |
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.
Love the changes, Thanks @ayaan-qadri !
1. Allow to custom size of DocsGPTWidgte using height, width, max width, max height
2. Added defaultOpen prop which was necessary to open widget when docsgpt-widget-plugin route hits without explicitly clicking on widget icon
These changes offer support for the sub problem of issue Feature: Backstage widget plugin #1341.
Custom sizing does not work in < 1280px screen (as far as i know, i do not think that backstage going to be use in mobile / < 1280px), lemme know if we need to add custom size prop also affect screen sizes < 1280px