Skip to content

fix: bulk attribute assignment#17896

Merged
eunjae-lee merged 5 commits into
mainfrom
eunjae/cal-4817-bulk-attribute-assignment-behaving-weirdly-not-able-to
Nov 29, 2024
Merged

fix: bulk attribute assignment#17896
eunjae-lee merged 5 commits into
mainfrom
eunjae/cal-4817-bulk-attribute-assignment-behaving-weirdly-not-able-to

Conversation

@eunjae-lee
Copy link
Copy Markdown
Contributor

@eunjae-lee eunjae-lee commented Nov 28, 2024

What does this PR do?

This PR fixes the bulk attribution assignment.

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-4817

I haven't found the root cause yet, but it looks like nuqs didn't get the query parameter when it was actually there. Within this component, we don't need to keep the state in the query parameters because it's just temporary UI state that doesn't need to be saved in the URL. Also, this state isn't something that needs to be shared with others or refreshable. So, I moved it to a local React Context.

Screenshot 2024-11-28 at 16 16 30

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 updated the developer docs in /docs 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.

How should this be tested?

  • Are there environment variables that should be set?
  • What are the minimal test data to have?
  • What is expected (happy path) to have (input and output)?
  • Any other important info that could help to test that PR

Checklist


Screenshot 2024-11-28 at 17 39 20

↑ I recommend this setting for this PR.

FYI

I've found a bug on the server side, but it's not directly related to this UI issue. So I created a ticket: https://linear.app/calcom/issue/CAL-4819/bulk-attribution-appends-new-item-to-a-single-select-attribute-instead

@linear
Copy link
Copy Markdown

linear Bot commented Nov 28, 2024

@keithwillcode keithwillcode added consumer core area: core, team members only labels Nov 28, 2024
);
return (
<>
<Fragment key={team.teamId}>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not related to this PR, but saw a warning message during the test.

export function MassAssignAttributesBulkAction({ table, filters }: Props) {
const { selectedAttribute, setSelectedAttribute, foundAttributeInCache } = useSelectedAttributes();
const [selectedAttributeOptions, setSelectedAttributeOptions] = useSelectedAttributeOption();
function Content({ showMultiSelectWarning }: { showMultiSelectWarning: boolean }) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've extracted Content out of the main component. The implementation is almost the same.

@eunjae-lee eunjae-lee force-pushed the eunjae/cal-4817-bulk-attribute-assignment-behaving-weirdly-not-able-to branch from a99d24e to c043c77 Compare November 28, 2024 16:41
@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Nov 29, 2024 9:20am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Nov 29, 2024 9:20am

@eunjae-lee eunjae-lee marked this pull request as ready for review November 29, 2024 08:29
@graphite-app graphite-app Bot requested a review from a team November 29, 2024 08:30
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Nov 29, 2024

Graphite Automations

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

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

"Add ready-for-e2e label" took an action on this PR • (11/29/24)

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

@dosubot dosubot Bot added the 🐛 bug Something isn't working label Nov 29, 2024
sean-brydon
sean-brydon previously approved these changes Nov 29, 2024
Copy link
Copy Markdown
Member

@sean-brydon sean-brydon left a comment

Choose a reason for hiding this comment

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

LGTM - yeah makes sense i dont think we need this state in nuqs

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 29, 2024

E2E results are ready!

…dly-not-able-to' of github.com:calcom/cal.com into eunjae/cal-4817-bulk-attribute-assignment-behaving-weirdly-not-able-to
@eunjae-lee eunjae-lee merged commit e8daa4f into main Nov 29, 2024
@eunjae-lee eunjae-lee deleted the eunjae/cal-4817-bulk-attribute-assignment-behaving-weirdly-not-able-to branch November 29, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working consumer core area: core, team members only ready-for-e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants