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

feat: Add dataset visuals for when a table is selected #21893

Merged
merged 7 commits into from
Oct 24, 2022

Conversation

lyndsiWilliams
Copy link
Member

@lyndsiWilliams lyndsiWilliams commented Oct 20, 2022

SUMMARY

This PR implements the visuals in the dataset panel that appear when a table is selected.

ANIMATED GIF

tableSelectedVisualsNoRefresh

TESTING INSTRUCTIONS

  • Go to http://localhost:9000/dataset/add/?testing
  • Select a database, schema, and table
  • Observe the table name header in the dataset panel with a table icon to the left, as well as a "Table columns" subheader below

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

{tableName}
<RefreshLabel
onClick={() => {
console.log(
Copy link
Member

Choose a reason for hiding this comment

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

is this console log necessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not, it was more a flag/placeholder for when the functionality is added into the next ticket.

@@ -65,6 +65,9 @@ export function datasetReducer(
}
}

const prevUrl =
Copy link
Member

Choose a reason for hiding this comment

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

this is still temporary?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure the status of this URL, I just moved it out so it didn't get lost in the middle of the other components.

@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Merging #21893 (eb9a0d8) into master (9a063ab) will increase coverage by 11.36%.
The diff coverage is 40.00%.

@@             Coverage Diff             @@
##           master   #21893       +/-   ##
===========================================
+ Coverage   55.55%   66.91%   +11.36%     
===========================================
  Files        1806     1807        +1     
  Lines       69140    69359      +219     
  Branches     7393     7474       +81     
===========================================
+ Hits        38409    46415     +8006     
+ Misses      28822    21014     -7808     
- Partials     1909     1930       +21     
Flag Coverage Δ
hive 52.92% <ø> (ø)
javascript 53.40% <40.00%> (+0.08%) ⬆️
mysql 78.35% <ø> (?)
postgres 78.41% <ø> (?)
presto 52.82% <ø> (ø)
python 81.47% <ø> (+23.52%) ⬆️
sqlite 76.89% <ø> (?)
unit 51.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...RUD/data/dataset/AddDataset/DatasetPanel/index.tsx 37.50% <25.00%> (-45.84%) ⬇️
...d/src/views/CRUD/data/dataset/AddDataset/index.tsx 57.89% <100.00%> (+4.95%) ⬆️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 56.31% <0.00%> (-0.31%) ⬇️
...ponents/Chart/DrillDetail/DrillDetailMenuItems.tsx 94.93% <0.00%> (-0.31%) ⬇️
...ackages/superset-ui-core/src/utils/featureFlags.ts 100.00% <0.00%> (ø)
...uperset-ui-core/src/query/types/AnnotationLayer.ts 100.00% <0.00%> (ø)
superset-frontend/src/components/Chart/utils.ts 85.71% <0.00%> (ø)
superset/config.py 91.69% <0.00%> (+0.63%) ⬆️
superset/views/database/views.py 31.36% <0.00%> (+0.90%) ⬆️
...frontend/src/components/Chart/ChartContextMenu.tsx 12.50% <0.00%> (+0.96%) ⬆️
... and 294 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

import { EmptyStateBig } from 'src/components/EmptyState';

type DatasetPanelProps = {
tableName?: string | null | undefined;

Choose a reason for hiding this comment

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

Do we need the null | undefined taking into account that the field is optional? Cannot just be :
tableName?: string ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yeah good call! Corrected in this commit.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, this prop is null when a table isn't selected so I added it to the type in this commit. Undefined wasn't needed here though, so still a good call, thanks! 😁

Choose a reason for hiding this comment

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

heheh ok ok 😄

Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez left a comment

Choose a reason for hiding this comment

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

LGTM!

@AAfghahi AAfghahi merged commit 175ec85 into master Oct 24, 2022
@lyndsiWilliams lyndsiWilliams deleted the lyndsi/table-selected-visuals branch October 31, 2022 12:41
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants