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

fix: CAL-3959 Disable Duplicate button in Readonly event type #15605

Conversation

DiveshHariani
Copy link

@DiveshHariani DiveshHariani commented Jun 27, 2024

What does this PR do?

Summary of Changes: Added condition to disable the duplicate button based on the readOnly value

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A-I have added a Docs issue here if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

Copy link

vercel bot commented Jun 27, 2024

@DiveshHariani is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Jun 27, 2024
@graphite-app graphite-app bot requested a review from a team June 27, 2024 22:57
Copy link
Contributor

github-actions bot commented Jun 27, 2024

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "fix issue CAL-3959: Disable Duplicate button in Readonly event type". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@github-actions github-actions bot added event-types area: event types, event-types Low priority Created by Linear-GitHub Sync ✅ good first issue Good for newcomers 🐛 bug Something isn't working labels Jun 27, 2024
@dosubot dosubot bot added this to the Community Only milestone Jun 27, 2024
Copy link

graphite-app bot commented Jun 27, 2024

Graphite Automations

"Add community label" took an action on this PR • (06/27/24)

1 label was added to this PR based on Keith Williams's automation.

"Add consumer team as reviewer" took an action on this PR • (06/27/24)

1 reviewer was added to this PR based on Keith Williams's automation.

@DiveshHariani DiveshHariani force-pushed the fix/3959-disable-duplicate-in-readonly-event-types branch from 04a0528 to d7df458 Compare June 27, 2024 23:11
@DiveshHariani DiveshHariani changed the title fix issue CAL-3959: Disable Duplicate button in Readonly event type fix: CAL-3959 Disable Duplicate button in Readonly event type Jun 27, 2024
Copy link
Contributor

@anikdhabal anikdhabal left a comment

Choose a reason for hiding this comment

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

Hey @DiveshHariani, instead of disabling the button, could you remove it?

Copy link
Contributor

@anikdhabal anikdhabal left a comment

Choose a reason for hiding this comment

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

Nice job!

You need to add this condition at the bottom component as well for small screens. You missed it.
And pls update the e2e test.

Copy link
Contributor

github-actions bot commented Jun 28, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Twenty-one Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/[user]/[type] 416.72 KB 644.44 KB 184.13% (🟡 +0.16%)
/[user]/[type]/embed 416.72 KB 644.44 KB 184.13% (🟡 +0.16%)
/apps/[slug]/[...pages] 593.41 KB 821.13 KB 234.61% (🟡 +0.22%)
/auth/saml-idp 12.22 KB 239.95 KB 68.56% (🟢 -20.80%)
/d/[link]/[slug] 416.52 KB 644.24 KB 184.07% (🟡 +0.16%)
/event-types 566.44 KB 794.16 KB 226.90% (🟡 +0.31%)
/event-types/[type] 442.09 KB 669.81 KB 191.38% (🟡 +0.16%)
/org/[orgSlug]/[user]/[type] 416.92 KB 644.64 KB 184.18% (🟡 +0.16%)
/org/[orgSlug]/[user]/[type]/embed 416.94 KB 644.66 KB 184.19% (🟡 +0.16%)
/org/[orgSlug]/instant-meeting/team/[slug]/[type] 416.54 KB 644.26 KB 184.07% (🟡 +0.16%)
/org/[orgSlug]/team/[slug]/[type] 416.73 KB 644.46 KB 184.13% (🟡 +0.16%)
/settings/admin/lockedSMS/UsersTable 79.95 KB 307.67 KB 87.91% (🟢 -0.15%)
/settings/admin/lockedSMS/lockedSMSView 119.43 KB 347.16 KB 99.19% (🟢 -0.18%)
/settings/admin/oAuth/oAuthView 95.48 KB 323.21 KB 92.34% (🟢 -0.18%)
/settings/organizations/[id]/about 159.64 KB 387.36 KB 110.67% (🟡 +0.47%)
/settings/organizations/[id]/add-teams 159.63 KB 387.35 KB 110.67% (🟡 +0.47%)
/settings/organizations/new 159.64 KB 387.37 KB 110.68% (🟡 +0.46%)
/settings/platform/new 120.69 KB 348.41 KB 99.54% (🟡 +0.52%)
/team/[slug]/[type] 416.7 KB 644.42 KB 184.12% (🟡 +0.16%)
/team/[slug]/[type]/embed 416.73 KB 644.45 KB 184.13% (🟡 +0.16%)
/video/[uid] 291.21 KB 518.93 KB 148.27% (🟢 -0.17%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@Mateen7c7
Copy link

/atteemp

@DiveshHariani
Copy link
Author

Nice job!

You need to add this condition at the bottom component as well for small screens. You missed it. And pls update the e2e test.

Thanks @anikdhabal. I will do these right away.

@DiveshHariani
Copy link
Author

Hi, I updated the code to remove the duplicate button. Can you please provide some guidelines for E2E tests? I cannot see any, for now, on Contributing.md. Do I need to create a new test or change the existing test?

@anikdhabal
Copy link
Contributor

Hey Divesh thanks for the work. But this pr #15511 is much earlier. Closing this

@anikdhabal anikdhabal closed this Jun 29, 2024
@dosubot dosubot bot modified the milestone: Community Only Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working community Created by Linear-GitHub Sync event-types area: event types, event-types ✅ good first issue Good for newcomers Low priority Created by Linear-GitHub Sync ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3959] Remove/Disable Duplicate button in Read Only mode of an event-type
4 participants