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

Scroll to created column when extracting or combining columns in chill mode #42650

Merged
merged 10 commits into from
May 17, 2024

Conversation

romeovs
Copy link
Contributor

@romeovs romeovs commented May 14, 2024

Closes #42674

Description

Describe the overall approach and the problem being solved.

How to verify

Describe the steps to verify that the changes are working as expected.

  1. Browse data -> Sample Database -> Accounts
  2. For each of these cases, the new column should be attached at the end and the table should be scrolled to the end so it's visible:
    a. Click the Email column header -> Click Extract domain, host -> Host
    b. Click the Email column header -> Click Combine column -> Done
    c. Click the Add column button in the table header -> Extract part of this column -> Email -> Host
    d. Click the Add column button in the table header -> Combine columns -> select some columns -> Done

@romeovs romeovs requested a review from ranquild May 14, 2024 15:47
@romeovs romeovs self-assigned this May 14, 2024
@romeovs romeovs added no-backport Do not backport this PR to any branch .Team/QueryingComponents labels May 14, 2024
@metabase-bot metabase-bot bot added the visual Run Percy visual testing label May 14, 2024
Copy link

github-actions bot commented May 14, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff 44cb385...ffba4e0.

Notify File(s)
@alxnddr frontend/src/metabase/visualizations/click-actions/actions/CombineColumnsAction/CombineColumnsAction.tsx
frontend/src/metabase/visualizations/click-actions/actions/ExtractColumn/ExtractColumn.tsx
frontend/src/metabase/visualizations/components/TableInteractive/TableInteractive.jsx
frontend/src/metabase/visualizations/components/Visualization/Visualization.jsx

Copy link

replay-io bot commented May 14, 2024

Status Complete ↗︎
Commit ffba4e0
Results
⚠️ 2 Flaky
2508 Passed

@romeovs romeovs requested a review from a team May 15, 2024 07:18
@romeovs romeovs changed the title [WIP] Scroll to created column when extracting or combining columns in chill mode Scroll to created column when extracting or combining columns in chill mode May 15, 2024
Copy link
Contributor

@ranquild ranquild left a comment

Choose a reason for hiding this comment

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

@romeovs I think we need to toggle the flag off to not scroll on new columns added by other methods (e.g. showing the column that was previously hidden). Could you toggle the flag after scrolling? Maybe in componentDidUpdate or something like that

@romeovs romeovs requested a review from ranquild May 16, 2024 15:14
@romeovs
Copy link
Contributor Author

romeovs commented May 17, 2024

@ranquild please have another look.

@romeovs romeovs added backport Automatically create PR on current release branch on merge and removed no-backport Do not backport this PR to any branch labels May 17, 2024
@romeovs romeovs merged commit 147b9f7 into master May 17, 2024
137 of 139 checks passed
@romeovs romeovs deleted the scroll-to-last-column branch May 17, 2024 14:23
github-actions bot pushed a commit that referenced this pull request May 17, 2024
…l mode (#42650)

* Set scrollToLastColumn ui control from column extract action

* Scroll to last column when the uiControl is set

* Scroll to last column when combining a column

* Scroll to last column when combining a column via the + shortcut

* Scroll to last column when extracting a column via the + shortcut

* Remove all references to settingsSyncOptions

* Check that the column is added at the end

* Disable scrollToLastColumn once used

* Add test that verifies scrollToLastColumn ui control has been reset
@iethree
Copy link
Contributor

iethree commented May 17, 2024

@romeovs this was the first commit after the v50 release branch was cut, so if you mean to backport to 49, you'll have to do that using this command: https://www.notion.so/metabase/Branching-Strategy-and-Backports-6eb577d5f61142aa960a626d6bbdfeb3?pvs=4#29927310b3b444efbb39edff6d62c549

metabase-bot bot added a commit that referenced this pull request May 17, 2024
…l mode (#42650) (#42832)

* Set scrollToLastColumn ui control from column extract action

* Scroll to last column when the uiControl is set

* Scroll to last column when combining a column

* Scroll to last column when combining a column via the + shortcut

* Scroll to last column when extracting a column via the + shortcut

* Remove all references to settingsSyncOptions

* Check that the column is added at the end

* Disable scrollToLastColumn once used

* Add test that verifies scrollToLastColumn ui control has been reset

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
oisincoveney pushed a commit that referenced this pull request May 20, 2024
…l mode (#42650)

* Set scrollToLastColumn ui control from column extract action

* Scroll to last column when the uiControl is set

* Scroll to last column when combining a column

* Scroll to last column when combining a column via the + shortcut

* Scroll to last column when extracting a column via the + shortcut

* Remove all references to settingsSyncOptions

* Check that the column is added at the end

* Disable scrollToLastColumn once used

* Add test that verifies scrollToLastColumn ui control has been reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/QueryingComponents visual Run Percy visual testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the created column to the end of the table and scroll to it
3 participants