-
Notifications
You must be signed in to change notification settings - Fork 70
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
feat(StudioToggleableTextfield): Create components to handle toggleable textfields and validation #12214
feat(StudioToggleableTextfield): Create components to handle toggleable textfields and validation #12214
Conversation
…id-component-to-match-new-design
…onentid-component-to-match-new-design
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 so far only looked at the EditComponentId implementation, I have a comment there for consideration.
Also, I noticed that there are some spacing issues when I tested the branch locally - there is too much space on either side of the component. The button itself seems to be correctly aligned, but I would expect the content to be left-aligned with the other content in the column.
Seems like overriding the button's style to remove padding-left
might help 🤔
frontend/packages/ux-editor/src/components/config/editModal/EditComponentId.tsx
Outdated
Show resolved
Hide resolved
…onentid-component-to-match-new-design
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/components/config/editModal/EditComponentId.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/components/config/editModal/EditComponentId.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/components/config/editModal/EditComponentId.tsx
Outdated
Show resolved
Hide resolved
…onentid-component-to-match-new-design
...o-components/src/components/StudioTextField/StudioIconTextfield/StudioIconTextfield.test.tsx
Fixed
Show fixed
Hide fixed
...o-components/src/components/StudioTextField/StudioIconTextfield/StudioIconTextfield.test.tsx
Fixed
Show fixed
Hide fixed
...o-components/src/components/StudioTextField/StudioIconTextfield/StudioIconTextfield.test.tsx
Fixed
Show fixed
Hide fixed
.../src/components/StudioTextField/StudioTextfieldToggleView/StudioTextfieldToggleView.test.tsx
Fixed
Show fixed
Hide fixed
.../src/components/StudioTextField/StudioTextfieldToggleView/StudioTextfieldToggleView.test.tsx
Fixed
Show fixed
Hide fixed
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.test.tsx
Fixed
Show fixed
Hide fixed
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.test.tsx
Fixed
Show fixed
Hide fixed
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.test.tsx
Fixed
Show fixed
Hide fixed
frontend/packages/ux-editor/src/components/config/editModal/EditComponentId.tsx
Fixed
Show fixed
Hide fixed
frontend/packages/ux-editor/src/components/config/editModal/EditComponentId.tsx
Fixed
Show fixed
Hide fixed
...components/src/components/StudioTextField/StudioIconTextfield/StudioIconTextfield.module.css
Outdated
Show resolved
Hide resolved
...components/src/components/StudioTextField/StudioIconTextfield/StudioIconTextfield.module.css
Outdated
Show resolved
Hide resolved
...studio-components/src/components/StudioTextField/StudioIconTextfield/StudioIconTextfield.tsx
Outdated
Show resolved
Hide resolved
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.tsx
Outdated
Show resolved
Hide resolved
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.tsx
Outdated
Show resolved
Hide resolved
frontend/libs/studio-components/src/components/StudioTextField/StudioSchemaUtils.ts
Outdated
Show resolved
Hide resolved
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.module.css
Outdated
Show resolved
Hide resolved
...rc/components/StudioTextField/StudioTextfieldToggleView/StudioTextfieldToggleView.module.css
Outdated
Show resolved
Hide resolved
.../src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.module.css
Outdated
Show resolved
Hide resolved
frontend/libs/studio-components/src/components/StudioTextField/StudioTextField.tsx
Outdated
Show resolved
Hide resolved
…onentid-component-to-match-new-design
… mode when it have an error
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12214 +/- ##
==========================================
+ Coverage 87.15% 87.21% +0.06%
==========================================
Files 1200 1209 +9
Lines 18049 18154 +105
Branches 2300 2315 +15
==========================================
+ Hits 15730 15833 +103
- Misses 2040 2041 +1
- Partials 279 280 +1 ☔ 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.
Nice! Last few things we need to do! 🚀
frontend/libs/studio-components/src/components/StudioIconTextfield/StudioIconTextfield.tsx
Outdated
Show resolved
Hide resolved
...components/StudioToggleableTextfield/StudioTextfieldToggleView/StudioTextfieldToggleView.tsx
Show resolved
Hide resolved
...ents/src/components/StudioToggleableTextfieldSchema/StudioToggleableTextfieldSchema.test.tsx
Outdated
Show resolved
Hide resolved
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.
@JamalAlabdullah can you cross check my commits and approve if you agree or give me some feedback if you disagree. 😊
@framitdavid Everything looks nice😊 thanks for your contribution ❤️ |
Description
This PR developed an input component that can toggle between viewing and editing modes. This component exists in two variants: one that accepts custom validation rules and one that validates against JSON schema. The variants are called
StudioToggleableTextfield
andStudioToggleableTextfieldSchema
, respectively.StudioToggleableTextfieldSchema
builds uponStudioToggleableTextfield
to separate logic and isolate the components as much as possible. Both variants are extensions of theStudioIconTexfield
component, which supports an icon to the left of the input field and extends the basicStudioTextfield
component.This PR includes AJV as a dependency in studio-components. Additionally, some types necessary for implementing JSON schema validation have been moved into the studio-components package.
Note: We should consider to make a folder named form that includes all the form components we have in Studio components.
Related Issue(s)
Verification