#5131 -Event Type Settings Inconsistency #5147
Conversation
CAL-210 Inconsistency between how toggle on settings appear in event type edit
When you're editing an event type and toggle on any settings, the behaviour for how and where they appear is very inconsistent. Some animate in and some just appear, some are disabled and then become enabled. Then in terms of position some are correctly aligned with the text above, and some are aligned to the far left. Then some are half way between. The correct appearance is in Figma |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…e-on-settings-appear-in-event-type-edit
| </div> | ||
| </div> | ||
| {children && ( | ||
| <div className="mt-4 lg:ml-14" ref={animateRef}> |
There was a problem hiding this comment.
We render an empty div with the animation ref so we can slowly fade in the content if !checked
| name="periodType" | ||
| control={formMethods.control} | ||
| render={({ field: { value } }) => ( | ||
| <SettingsToggle |
There was a problem hiding this comment.
Moves bulk of code into the component - children are passed through to be rendered on true
| "react": "^18.2.0", | ||
| "react-colorful": "^5.6.0", | ||
| "react-feather": "^2.0.10", | ||
| "@formkit/auto-animate": "^1.0.0-beta.1", |
There was a problem hiding this comment.
Why was this not in UI already :D
|
Looks like a great solution to me 👏 |
…e-on-settings-appear-in-event-type-edit
| <SettingsToggle | ||
| title={t("limit_booking_frequency")} | ||
| description={t("limit_booking_frequency_description")} | ||
| checked={Object.keys(value ?? {}).length > 0} |
There was a problem hiding this comment.
Would enabled onEnabledChange - be better naming?
There was a problem hiding this comment.
I'm not sure here tbs - checked is also shared with out switch component so if we were to change it one place I'd deffo saw we should change it there too
| @@ -0,0 +1,57 @@ | |||
| import { useAutoAnimate } from "@formkit/auto-animate/react"; | |||
There was a problem hiding this comment.
Does this have to be in v2 (this file I mean)?
There was a problem hiding this comment.
No it doesn't - but I believe it should live here until we fully migrate everything from V2 -> v1 files so we don't accidentally remove anything we are meant to in the clean up
…e-on-settings-appear-in-event-type-edit
* Reusable component * Fix limits not being toggleable * Remove custom input margin * addTestId * Limits+adv * Reccuring Tab * Remove console .log Co-authored-by: Omar López <zomars@me.com>
* Reusable component * Fix limits not being toggleable * Remove custom input margin * addTestId * Limits+adv * Reccuring Tab * Remove console .log Co-authored-by: Omar López <zomars@me.com>
* Reusable component * Fix limits not being toggleable * Remove custom input margin * addTestId * Limits+adv * Reccuring Tab * Remove console .log Co-authored-by: Omar López <zomars@me.com>

Fixes the settings inconsistency throughout the Event Type pages
https://www.loom.com/share/0f436a1c729242f984b1328ebd22c320