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

chore(toggle thumbnails): use localstorage for toggle #14013

Merged
merged 3 commits into from
Apr 16, 2021

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Apr 8, 2021

SUMMARY

This is follow up for toggle thumbnails for homescreen to make the listviews show thumbnails based off homescreen toggle.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-04-07.at.10.38.28.PM.mov

TEST PLAN

enable feature flag THUMBNAILS = True
check each listview for toggle of thumbnails

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #14013 (713a673) into master (b5c95c5) will increase coverage by 0.12%.
The diff coverage is 94.82%.

❗ Current head 713a673 differs from pull request most recent head 1589d95. Consider uploading reports for the commit 1589d95 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14013      +/-   ##
==========================================
+ Coverage   79.28%   79.41%   +0.12%     
==========================================
  Files         936      936              
  Lines       47408    47444      +36     
  Branches     5938     5954      +16     
==========================================
+ Hits        37589    37677      +88     
+ Misses       9693     9639      -54     
- Partials      126      128       +2     
Flag Coverage Δ
cypress 56.05% <66.66%> (+0.01%) ⬆️
javascript 68.87% <93.93%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
...set-frontend/src/views/CRUD/welcome/ChartTable.tsx 77.08% <ø> (ø)
...frontend/src/views/CRUD/welcome/DashboardTable.tsx 63.63% <ø> (ø)
superset/reports/commands/execute.py 92.82% <66.66%> (-0.41%) ⬇️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 84.32% <80.00%> (-0.17%) ⬇️
...rontend/src/views/CRUD/dashboard/DashboardList.tsx 80.50% <80.00%> (-0.03%) ⬇️
...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx 100.00% <100.00%> (ø)
...perset-frontend/src/views/CRUD/chart/ChartCard.tsx 80.48% <100.00%> (+1.00%) ⬆️
...rontend/src/views/CRUD/dashboard/DashboardCard.tsx 83.33% <100.00%> (+1.28%) ⬆️
.../src/views/CRUD/data/savedquery/SavedQueryList.tsx 73.72% <100.00%> (+2.17%) ⬆️
...perset-frontend/src/views/CRUD/welcome/Welcome.tsx 84.61% <100.00%> (ø)
... and 11 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 b5c95c5...1589d95. Read the comment docs.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 8, 2021
@junlincc junlincc added the home:others Related to Homepage / Welcome page label Apr 8, 2021
Copy link

@junlin-qa junlin-qa left a comment

Choose a reason for hiding this comment

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

Tested locally! LGTM when thumbnail is NOT enabled! Thanks for the fix 🙏
When thumbnail IS enabled, the default is still card view, can we make it consistent, default to list for all time? @pkdotson
please note: currently view is not sticky. after user switch from list to card view, and refresh, it lands on list view again. that should be the expected behavior as well.

Screen.Recording.2021-04-08.at.10.19.25.AM.mov

@rusackas
Copy link
Member

rusackas commented Apr 14, 2021

When thumbnail IS enabled, the default is still card view, can we make it consistent, default to list for all time? @pkdotson

My understanding is that the selection of list/cards should be set via LISTVIEWS_DEFAULT_CARD_VIEW and decoupled from the thumbnail feature flag (THUMBNAILS).

please note: currently view is not sticky. after user switch from list to card view, and refresh, it lands on list view again. that should be the expected behavior as well.

As I understand from the title, the "stickiness" is the point of this PR... the description could probably be clearer on this the intent, and the testing steps). If the view setting is not being saved/retrieved here, then something may be wrong.

From the video, it looks like thumbnail display IS sticking. I'll do a test as well.

@rusackas
Copy link
Member

/testenv up FEATURE_THUMBNAILS=true

@github-actions
Copy link
Contributor

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

@rusackas
Copy link
Member

/testenv down

@rusackas
Copy link
Member

/testenv up FEATURE_THUMBNAILS=True

@github-actions
Copy link
Contributor

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

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM!

@rusackas rusackas merged commit 38a1f65 into apache:master Apr 16, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@rusackas rusackas deleted the fix-toggle branch April 16, 2021 05:04
@henryyeh
Copy link
Contributor

🏷️2021.13

1 similar comment
@henryyeh
Copy link
Contributor

🏷️2021.13

@junlincc junlincc removed the rush! Requires immediate attention label Apr 20, 2021
henryyeh pushed a commit to preset-io/superset that referenced this pull request Apr 20, 2021
* use localstorage for toggle

* fix lint

* add check

(cherry picked from commit 38a1f65)
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* use localstorage for toggle

* fix lint

* add check
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 home:others Related to Homepage / Welcome page preset:2021.15 preset-io release:note size/M 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard] dashboard card view is not showing thumbnail in dashboard list
7 participants