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 a tooltip to clarify metric_name in the DatasetEditor #24348

Merged
merged 5 commits into from
Jun 13, 2023

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Jun 10, 2023

Screen Shot 2023-06-09 at 5 41 02 PM Screen Shot 2023-06-12 at 4 42 27 PM

SUMMARY

Adding this tooltip that clarifies the usage of the Metric field in the dataset's metric list. It seems critical to let the user know how this is used.

I don't think this is how we want this to work (user-provided name as a unique key to associate with charts, but somehow is important to let the user know about it)

Longer term, we should use UUIDs for metrics internally and rename this "Metric Alias" or just get rid of it.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #24348 (53aea6b) into master (4e47771) will decrease coverage by 0.04%.
The diff coverage is 86.58%.

❗ Current head 53aea6b differs from pull request most recent head 9eb85ed. Consider uploading reports for the commit 9eb85ed to get more accurate results

@@            Coverage Diff             @@
##           master   #24348      +/-   ##
==========================================
- Coverage   69.08%   69.04%   -0.04%     
==========================================
  Files        1905     1903       -2     
  Lines       74813    74538     -275     
  Branches     8107     8110       +3     
==========================================
- Hits        51686    51468     -218     
+ Misses      21016    20958      -58     
- Partials     2111     2112       +1     
Flag Coverage Δ
javascript 55.62% <82.35%> (+<0.01%) ⬆️
sqlite ?

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

Impacted Files Coverage Δ
...ackages/superset-ui-core/src/utils/featureFlags.ts 100.00% <ø> (ø)
...preset-chart-deckgl/src/layers/Scatter/Scatter.jsx 0.00% <0.00%> (ø)
...end/src/components/Datasource/DatasourceEditor.jsx 65.35% <ø> (ø)
superset/models/sql_lab.py 79.51% <0.00%> (+0.94%) ⬆️
superset/utils/decorators.py 96.22% <ø> (+1.78%) ⬆️
superset/views/__init__.py 100.00% <ø> (ø)
superset/views/base.py 77.21% <ø> (ø)
superset-frontend/src/views/store.ts 75.00% <50.00%> (-3.27%) ⬇️
superset/models/filter_set.py 77.27% <50.00%> (-0.34%) ⬇️
superset/security/manager.py 93.83% <66.66%> (-2.12%) ⬇️
... and 15 more

... and 6 files with indirect coverage changes

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

@@ -222,6 +226,11 @@ export default class CRUDCollection extends React.PureComponent<
return label;
}

getTooltip(col: any) {
Copy link
Member

Choose a reason for hiding this comment

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

can we put a type for col here too? It looks like in line 232 it's defined as a string.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
getTooltip(col: any) {
getTooltip(col: string) {

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

I just left a small nit comment. LGTM!

renderTH(col: string, sortColumns: Array<string>) {
const tooltip = this.getTooltip(col);
return (
<th key={col} className="no-wrap">
Copy link
Member Author

Choose a reason for hiding this comment

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

no-wrap is the real mvp I snuck into this PR

Copy link
Member Author

Choose a reason for hiding this comment

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

fixing this monstruosity:
Screen Shot 2023-06-12 at 4 47 23 PM

@mistercrunch mistercrunch merged commit dd77aac into apache:master Jun 13, 2023
@mistercrunch mistercrunch deleted the dataset_tooltip branch June 13, 2023 01:32
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 8, 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 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants