fix: toggle fullscreen on the dashboard#14979
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14979 +/- ##
==========================================
- Coverage 77.61% 77.38% -0.24%
==========================================
Files 965 965
Lines 49503 49504 +1
Branches 6259 6259
==========================================
- Hits 38422 38308 -114
- Misses 10881 10996 +115
Partials 200 200
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
This comes down to taste, but I think the double bang could be done directly here (seems clear enough).
There was a problem hiding this comment.
the "negation" is needed here, the hasStandalone has been boolean type.
There was a problem hiding this comment.
standalonecan actually be called with the value2, in which case it removes the title:
So perhapsnumber | booleancould be a good solution here, as it appears to work as expected with valuesundefined,true,false,0,1and2?
I know this, but I don't think it's a good design. When we remove the header there is no chance to go back. (users need to remove/change standalone parameter from the URL)
I'm thinking we should introduce a new parameter for handle "remove header", instead of using int to sign status, and introduce a button(or icon) allow users to go back.
There was a problem hiding this comment.
I'm fine with that approach - I think this was discussed to some degree on the PR that introduced it: #12918
There was a problem hiding this comment.
Thanks for your point out.
09b6373 to
526b5a5
Compare
villebro
left a comment
There was a problem hiding this comment.
LGTM with minor stylistic alternative to consider
| const hasStandalone = !!getUrlParam(URL_PARAMS.standalone); | ||
| const url = getDashboardUrl( | ||
| window.location.pathname, | ||
| getActiveFilters(), | ||
| window.location.hash, | ||
| getUrlParam(URL_PARAMS.standalone), | ||
| !hasStandalone, |
There was a problem hiding this comment.
I suppose it would also be correct to do
!getUrlParam(URL_PARAMS.standalone)here?
There was a problem hiding this comment.
right, but I feel weird to do "negation" after returning a number type or null type.
|
@junlincc Ephemeral environment spinning up at http://52.33.74.122:8080. Credentials are |
* upstream/master: (68 commits) fix typos (apache#14950) docs: fix custom oauth config (apache#14997) fix: apply template_params on external_metadata (apache#14996) fix: toggle fullscreen on the dashboard (apache#14979) feat(native-filters): add markers and number formatter + simple tests (apache#14981) fix(native-filters): Fix "undefined" error after editing a filter (apache#14984) fix(native-filters): remove implied fetch predicate (apache#14982) fix(native-filters): update cascaded filter state on change (apache#14980) fix(filter box): replace freeform where clause with ilike (apache#14900) refactor: Convert TableElement.jsx component from class to functional with hooks (apache#14830) fix: renamed sqllab filters to _filters (apache#14971) feat(native-filters): apply cascading without instant filtering (apache#14966) chore: bump superset-ui to 0.17.53 (apache#14968) fix(native-filters): cascading filters not rendering in tab (apache#14964) feat: add type_generic and is_dttm to table metadata (apache#14863) additional safeguard (apache#14953) feat: Adding FORCE_SSL as feature flag in config.py (apache#14934) feat(dashboard/native-filters): Hide filters out of scope of current tab (apache#14933) fix: time parser truncate to first day of year/month (apache#14945) fix: is_temporal should overwrite is_dttm (apache#14894) ...

SUMMARY
closes: #14961
This is a regression bug. currently, the user can't make the dashboard to fullscreen mode, this PR fixed it.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
before
dashboard.before.mp4
after
dashboard.after.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION