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 field visibility in the model editor #45816

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ranquild
Copy link
Contributor

@ranquild ranquild commented Jul 18, 2024

Fixes #33844

Previously, if you set "Detail views only" setting on a field in Model metadata, the editor would somewhat break. There are many symptoms of this problem. Now the setting is only saved but has no effect on data displayed in the table itself - the fields would be always visible.

How to verify:

  • New -> Model -> Orders
  • Metadata -> Select ID -> Detail views only -> Save
  • Make sure the ID column is hidden in Simple mode now
  • Make sure that the object detail view still works despite the PK being hidden
  • Open Metadata Editor again. ID column should be visible and the value should "Detail views only". Change it to the default value and save
  • Make sure that the column became visible again.
Screenshot 2024-07-18 at 13 57 19 Screenshot 2024-07-18 at 13 57 13

@ranquild ranquild self-assigned this Jul 18, 2024
@ranquild ranquild requested a review from a team July 18, 2024 17:58
@ranquild ranquild added the backport Automatically create PR on current release branch on merge label Jul 18, 2024
Copy link

github-actions bot commented Jul 18, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff bcd5a00...ef62859.

Notify File(s)
@alxnddr frontend/src/metabase/visualizations/components/TableInteractive/TableInteractive.jsx

Copy link

replay-io bot commented Jul 18, 2024

Status Complete ↗︎
Commit ef62859
Results
⚠️ 3 Flaky
2828 Passed

@@ -837,6 +841,47 @@ describe("issue 39993", () => {
});
});

describe("issue 33844", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This symptom is also present in master.
LMK if you think we should fix this separately.


  1. New -> Model -> Orders
  2. Metadata -> Select ID -> Detail views only -> Save
  3. Make sure the ID column is hidden in Simple mode now
  4. Open Metadata Editor again. ID column should be visible and the value should "Detail views only".
  5. Cancel editing, discard changes

ID column is visible in simple mode

  1. Open Metadata Editor again.

ID column has "Table and details views" setting.


2024-07-19.15-08-04.mp4

@ranquild ranquild marked this pull request as draft July 19, 2024 23:41
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing a column's visibility to detail only does not save for models
2 participants