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(Dashboard): Omnibar dropdown visibility and keyboard commands #16168

Merged
merged 4 commits into from
Aug 13, 2021
Merged

fix(Dashboard): Omnibar dropdown visibility and keyboard commands #16168

merged 4 commits into from
Aug 13, 2021

Conversation

geido
Copy link
Member

@geido geido commented Aug 10, 2021

SUMMARY

This PR fixes a problem with the visibility of the Omnibar dropdown. It also implements the ability to close the Omnibar by clicking ESC. Finally, it removes the ability to open the Omnibar with the ctrl/cmd + s in order to stop it from interfering with the default browser functionality. The Omnibar can now be opened with ctrl/cmd + k.

Fixes: #15539

BEFORE

FCC.New.Coder.Su.mp4

AFTER

FCC.New.Coder.Su.1.mp4

TESTING INSTRUCTIONS

  1. Open a Dashboard
  2. Press cmd + k or ctrl + k
  3. Observe the Omnibar appearing and search for a Dashboard
  4. Make sure that the matching Dashboards appear
  5. Press ESC and make sure the Omnibar closes

ADDITIONAL INFORMATION

  • Has associated issue: [dashboard]Broken OMNIBAR feature #15539
  • 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

@geido
Copy link
Member Author

geido commented Aug 10, 2021

@pull-request-size pull-request-size bot added size/M and removed size/S labels Aug 10, 2021
@codecov
Copy link

codecov bot commented Aug 10, 2021

Codecov Report

Merging #16168 (2eb3a2a) into master (4df3672) will decrease coverage by 0.07%.
The diff coverage is 68.75%.

❗ Current head 2eb3a2a differs from pull request most recent head 88ce84f. Consider uploading reports for the commit 88ce84f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16168      +/-   ##
==========================================
- Coverage   76.83%   76.75%   -0.08%     
==========================================
  Files         996      997       +1     
  Lines       53060    53201     +141     
  Branches     6766     6765       -1     
==========================================
+ Hits        40766    40836      +70     
- Misses      12066    12135      +69     
- Partials      228      230       +2     
Flag Coverage Δ
javascript 71.04% <58.00%> (-0.14%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/components/Form/Form.tsx 100.00% <ø> (ø)
...ontrols/DndColumnSelectControl/DndColumnSelect.tsx 46.42% <ø> (-0.94%) ⬇️
...ontrols/DndColumnSelectControl/DndMetricSelect.tsx 41.21% <0.00%> (-0.57%) ⬇️
...rontend/src/explore/components/optionRenderers.tsx 100.00% <ø> (ø)
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 72.61% <ø> (ø)
...set-frontend/src/views/CRUD/data/database/types.ts 100.00% <ø> (ø)
...set-frontend/src/views/CRUD/welcome/ChartTable.tsx 73.17% <0.00%> (-1.83%) ⬇️
...c/visualizations/TimeTable/TimeTableChartPlugin.js 75.00% <ø> (ø)
superset/common/query_object.py 90.66% <ø> (ø)
superset/datasets/commands/importers/v1/utils.py 58.97% <0.00%> (ø)
... and 43 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4df3672...88ce84f. Read the comment docs.

@geido
Copy link
Member Author

geido commented Aug 10, 2021

/testenv up FEATURE_OMNIBAR=true

@github-actions
Copy link
Contributor

@geido Ephemeral environment spinning up at http://34.209.163.80:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@michael-s-molina
Copy link
Member

1 - I wasn't able to open the Omnibar from the Dashboards page, only when entering a particular dashboard.

2 - When I open the bar again it's showing the search field with my previous search. Shouldn't be empty (initial state)?

3- I wasn't able to select one dashboard using the arrow keys because of the auto-complete. Can we disable it for this case?

Screen.Recording.2021-08-10.at.4.09.34.PM.mov

@geido
Copy link
Member Author

geido commented Aug 10, 2021

Thanks for your feedback @michael-s-molina

I agree with all your points. However, those are all enhancements which aren't part of the original issue.

I can open separate PRs for those depending on priority but let's get the original issue out of the way first.

Thank you!

@rusackas rusackas requested a review from hughhhh August 10, 2021 21:23
@geido
Copy link
Member Author

geido commented Aug 11, 2021

Hey @michael-s-molina, I have captured those enhancements in this issue #16198

@junlincc
Copy link
Member

junlincc commented Aug 12, 2021

Im inclined to let this one in asap for the quick fix. then we can work on the enhancement

Thank you so much for the improvement and suggestion! :) @geido @michael-s-molina

@@ -84,40 +84,6 @@ test('Open Omnibar with ctrl + k with featureflag enabled', () => {
).not.toBeVisible();
});

test('Open Omnibar with ctrl + s with featureflag enabled', () => {
Copy link
Member

Choose a reason for hiding this comment

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

It seems like this test could be written with K and esc keystrokes, to keep it rather than delete it.

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Functional implementation seems fine, but can we keep the test with only slight modifications?

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

Sorry for the misconception about the test... this looks fine.

…est.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>
@geido geido merged commit c09f6ed into apache:master Aug 13, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

amitmiran137 pushed a commit that referenced this pull request Aug 16, 2021
…gies

* upstream/master: (64 commits)
  check roles before fetching reports (#16260)
  chore: upgrade mypy and add type guards (#16227)
  fix: pivot columns with ints for name (#16259)
  chore(pylint): Bump Pylint to 2.9.6 (#16146)
  fix examples tab for dashboard (#16253)
  chore: bump superset-ui packages to 0.17.84 (#16251)
  chore: Shows the dataset description in the gallery dropdown (#16200)
  fix(Dashboard): Omnibar dropdown visibility and keyboard commands (#16168)
  chore: bump py version for integration test (#16213)
  fix: skip perms on query context update (#16250)
  refactor: external metadata fetch API (#16193)
  feat(dao): admin can remove self from object owners (#15149)
  fix(dashboard): cross filter chart highlight when filters badge icon clicked (#16233)
  fix: validate_parameters and query (#16241)
  fix: Remove Advanced Analytics tag for 2 charts (#16240)
  Revert "feat: Changing Dataset names (#16199)" (#16235)
  feat: Allow users to connect via legacy SQLA form (#16201)
  fix: remove encryption from db params (#16214)
  fix(Explore): Show the tooltip only when label does not fit the container in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel (#16060)
  Show/hide tooltips (#16192)
  ...

# Conflicts:
#	superset/tasks/caching/cache_strategy.py
@kamalkeshavani-aiinside
Copy link
Contributor

kamalkeshavani-aiinside commented Oct 26, 2021

@rusackas @junlincc I can see that this and #16273 are not picked up in recent 1.3.x releases. Please tag them for upcoming 1.4 release.

opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…ache#16168)

* Fix style and implement ESC

* Include ESC test case

* Update superset-frontend/src/components/OmniContainer/OmniContainer.test.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

Co-authored-by: Evan Rusackas <evan@preset.io>
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
…ache#16168)

* Fix style and implement ESC

* Include ESC test case

* Update superset-frontend/src/components/OmniContainer/OmniContainer.test.tsx

Co-authored-by: Evan Rusackas <evan@preset.io>

Co-authored-by: Evan Rusackas <evan@preset.io>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 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 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard]Broken OMNIBAR feature
6 participants