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: remove FAB rendered menu in favor of react based one #10401

Merged
merged 1 commit into from
Aug 22, 2020

Conversation

nytai
Copy link
Member

@nytai nytai commented Jul 22, 2020

SUMMARY

mostly what the title says.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

Nothing should change from a user perspective.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2020

Codecov Report

Merging #10401 into master will increase coverage by 11.96%.
The diff coverage is 60.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #10401       +/-   ##
===========================================
+ Coverage   60.18%   72.14%   +11.96%     
===========================================
  Files         783      424      -359     
  Lines       36934    13775    -23159     
  Branches     3527     3529        +2     
===========================================
- Hits        22228     9938    -12290     
+ Misses      14519     3730    -10789     
+ Partials      187      107       -80     
Flag Coverage Δ
#cypress 54.83% <100.00%> (?)
#javascript 60.83% <0.00%> (-0.05%) ⬇️
#python ?

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

Impacted Files Coverage Δ
superset-frontend/src/views/menu.tsx 60.00% <60.00%> (ø)
...src/components/FilterableTable/FilterableTable.tsx 81.77% <0.00%> (-0.41%) ⬇️
superset/migrations/versions/5ccf602336a0_.py
superset/charts/schemas.py
superset/utils/logging_configurator.py
...ions/versions/a2d606a761d9_adding_favstar_model.py
superset/dashboards/commands/delete.py
...d6ffdf31bdd4_add_published_column_to_dashboards.py
...migrations/versions/fb13d49b72f9_better_filters.py
superset/dashboards/filters.py
... and 500 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 b86c0e5...9481c36. Read the comment docs.

@mistercrunch
Copy link
Member

years

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 23, 2020
@nytai nytai marked this pull request as ready for review July 24, 2020 22:13
@rusackas
Copy link
Member

excited

@rusackas rusackas requested a review from dpgaspar July 24, 2020 22:22
@rusackas
Copy link
Member

Tempted to just approve/merge this puppy, but hoping to see if @dpgaspar has any input on it first.

Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

Looks good, but we should make sure that the public role still works

root_path = "#"
logo_target_path = ""
if not g.user.is_anonymous:
user_is_anonymous = True
if hasattr(g, "user") and not g.user.is_anonymous:
Copy link
Member

@dpgaspar dpgaspar Jul 25, 2020

Choose a reason for hiding this comment

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

This defeats the Public role. menu.get_data is already checking if the user is authenticated and if not gets the permissions from the Public role. Is there any other blocker?

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 think the main issue is that the public role doesn't work. I was getting an error on the sign in view for menu.get_data.

Also this test https://github.com/preset-io/incubator-superset/blob/master/tests/schedules_test.py#L495 was failing without the hasattr(g, "user") check.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't that a flaky test? would risk to say it was a coincidence.
Re checked and it works with anonymous and the public role, https://github.com/dpgaspar/Flask-AppBuilder/blob/master/flask_appbuilder/tests/test_menu.py#L101 but we need to add the endpoint to the public role. Yet menu.get_data shoud work

@rusackas
Copy link
Member

When this PR is merged, #10423 is ready to follow.

</ul>
{% block navbar %}
<div id="app-menu">
<div class="navbar navbar-static-top {{menu.extra_classes}}" role="navigation">
Copy link
Member Author

Choose a reason for hiding this comment

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

serves as a placeholder while the menu app initializes and mounts.

@nytai nytai merged commit 45fee60 into apache:master Aug 22, 2020
@nytai nytai deleted the tai/replace-fab-menu branch August 22, 2020 00:19
@rusackas
Copy link
Member

Impacts #8976

@villebro villebro added the v0.38 label Sep 10, 2020
villebro pushed a commit to preset-io/superset that referenced this pull request Sep 11, 2020
Ofeknielsen pushed a commit to ofekisr/incubator-superset that referenced this pull request Oct 5, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.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 size/L v0.38 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants