Skip to content
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

Improvement/cal 639 turn edit location dialog into radix uu #1055

Merged

Conversation

alishaz-polymath
Copy link
Member

@alishaz-polymath alishaz-polymath commented Oct 27, 2021

  • Removes headless UI from event-types/[type].tsx
  • Replaces Modal with Dialog in Edit Location
  • Adds react-hook-form
  • Fixes Radio button bug

@linear
Copy link

linear bot commented Oct 27, 2021

CAL-639 turn “edit location” dialog into radix-uu

if you find a minute, looks like this dialog is still legacy

Reported by Peer.

@vercel
Copy link

vercel bot commented Oct 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/cal/calendso/CtaVNAqhGcDvymvXszyU6BszobYV
✅ Preview: https://calendso-git-improvement-cal-639-turn-edit-location-5460f6-cal.vercel.app

@vercel vercel bot temporarily deployed to Preview November 3, 2021 10:38 Inactive
@vercel vercel bot temporarily deployed to Preview November 3, 2021 13:05 Inactive
@vercel vercel bot temporarily deployed to Preview November 4, 2021 13:50 Inactive
@vercel vercel bot temporarily deployed to Preview November 15, 2021 04:16 Inactive
@vercel vercel bot temporarily deployed to Preview November 15, 2021 06:10 Inactive
@vercel vercel bot temporarily deployed to Preview November 15, 2021 06:37 Inactive
@vercel vercel bot temporarily deployed to Preview November 18, 2021 08:22 Inactive
@vercel vercel bot temporarily deployed to Preview November 18, 2021 08:34 Inactive
@vercel vercel bot temporarily deployed to Preview November 18, 2021 11:34 Inactive
@vercel vercel bot temporarily deployed to Preview November 18, 2021 11:37 Inactive
@vercel vercel bot temporarily deployed to Preview November 19, 2021 13:13 Inactive
@alishaz-polymath alishaz-polymath force-pushed the improvement/cal-639-turn-edit-location-dialog-into-radix-uu branch from 42735a9 to dd30bcd Compare November 19, 2021 15:20
@vercel vercel bot temporarily deployed to Preview November 19, 2021 15:20 Inactive
@alishaz-polymath alishaz-polymath marked this pull request as ready for review November 19, 2021 15:43
Copy link
Contributor

@emrysal emrysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Font size on period types is a bit too big, minor thing:

image

I've managed to reproduce the bug with multiple locations. It happens when you open the dialog, then cancel, then drop the select again, cancel.. rince repeat and you'll break it more and more. Up to you if you want to take a look or have a look (or someone else) in a dedicated PR.

image

Code itself is a big improvement, well done


const [hidden, setHidden] = useState<boolean>(eventType.hidden);
console.log("periodType", periodType, eventType.periodType);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small debug line left

@alishaz-polymath
Copy link
Member Author

I've managed to reproduce the bug with multiple locations

Yeah, that bug is frustrating. I haven't been able to pinpoint the reason behind it. It's in prod, and I couldn't figure out why this is, hence not really worked on it in this PR.

@vercel vercel bot temporarily deployed to Preview November 22, 2021 09:22 Inactive
Copy link
Member

@zomars zomars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this! I left some comments about minor details.

pages/event-types/[type].tsx Outdated Show resolved Hide resolved
pages/event-types/[type].tsx Outdated Show resolved Hide resolved
pages/event-types/[type].tsx Outdated Show resolved Hide resolved
pages/event-types/[type].tsx Outdated Show resolved Hide resolved
pages/event-types/[type].tsx Show resolved Hide resolved
pages/event-types/[type].tsx Show resolved Hide resolved
value={asStringOrUndefined(eventType.schedulingType)}
options={schedulingTypeOptions}
onChange={(val) => {
formMethods.setValue("schedulingType", val);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also here:

Argument of type 'ChangeEvent<HTMLSelectElement>' is not assignable to parameter of type 'SchedulingType'.
  Type 'ChangeEvent<HTMLSelectElement>' is not assignable to type '"COLLECTIVE"'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is actually related to the components/ui/form/radio-area/RadioAreaGroup definition of onChange. I'm not sure what's the best way to proceed in this case.

Copy link
Member

@zomars zomars Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can make this in a follow up PR. It's good enough for now 👍🏽

@vercel vercel bot temporarily deployed to Preview November 23, 2021 09:06 Inactive
@alishaz-polymath alishaz-polymath force-pushed the improvement/cal-639-turn-edit-location-dialog-into-radix-uu branch from 30d3a34 to ce6c61d Compare November 23, 2021 09:37
@vercel vercel bot temporarily deployed to Preview November 23, 2021 09:37 Inactive
@vercel vercel bot temporarily deployed to Preview November 24, 2021 11:49 Inactive
@vercel vercel bot temporarily deployed to Preview November 24, 2021 16:02 Inactive
@zomars zomars merged commit d8b3c42 into main Nov 24, 2021
@zomars zomars deleted the improvement/cal-639-turn-edit-location-dialog-into-radix-uu branch November 24, 2021 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants