-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Conversation
4a146c6
to
fa83c83
Compare
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Tempted to just approve/merge this puppy, but hoping to see if @dpgaspar has any input on it first. |
There was a problem hiding this 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
superset/views/base.py
Outdated
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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
When this PR is merged, #10423 is ready to follow. |
111674b
to
9481c36
Compare
</ul> | ||
{% block navbar %} | ||
<div id="app-menu"> | ||
<div class="navbar navbar-static-top {{menu.extra_classes}}" role="navigation"> |
There was a problem hiding this comment.
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.
6ee815b
to
a4cde19
Compare
a4cde19
to
86fa170
Compare
Impacts #8976 |
SUMMARY
mostly what the title says.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
Nothing should change from a user perspective.
ADDITIONAL INFORMATION