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

feat: allow user to view their profile again #11816

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Nov 25, 2020

SUMMARY

At some point, clicking on the Superset logo was redirected to the "Welcome" page (good!). But because of that, it removed any ability for the user to view their own profile (bad...). This PR adds the Profile link in the settings menu and moves the userinfo link to "Info" (a bit more descriptive of what it does i think).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2020-11-25 at 3 35 53 PM
After:
Screen Shot 2020-11-25 at 3 40 18 PM

TEST PLAN

CI, ensure the new links work across all pages

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

to: @betodealmeida @nytai @graceguo-supercat @rusackas

@codecov-io
Copy link

codecov-io commented Nov 25, 2020

Codecov Report

Merging #11816 (5c9a6af) into master (13c51d5) will increase coverage by 3.58%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11816      +/-   ##
==========================================
+ Coverage   63.59%   67.17%   +3.58%     
==========================================
  Files         916      916              
  Lines       44479    44547      +68     
  Branches     4227     4229       +2     
==========================================
+ Hits        28286    29925    +1639     
+ Misses      16014    14519    -1495     
+ Partials      179      103      -76     
Flag Coverage Δ
cypress 55.12% <100.00%> (?)
javascript 62.92% <50.00%> (-0.01%) ⬇️
python 63.50% <ø> (-0.48%) ⬇️

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

Impacted Files Coverage Δ
superset/views/base.py 72.68% <ø> (ø)
superset-frontend/src/components/Menu/Menu.tsx 94.73% <100.00%> (+31.22%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-85.72%) ⬇️
superset/db_engine_specs/hive.py 54.08% <0.00%> (-29.97%) ⬇️
superset/db_engine_specs/presto.py 69.76% <0.00%> (-12.53%) ⬇️
superset/examples/world_bank.py 97.10% <0.00%> (-2.90%) ⬇️
superset/examples/birth_names.py 96.51% <0.00%> (-2.33%) ⬇️
...et-frontend/src/SqlLab/components/LimitControl.tsx 89.36% <0.00%> (-1.95%) ⬇️
superset/views/database/mixins.py 80.70% <0.00%> (-1.76%) ⬇️
...-frontend/src/datasource/ChangeDatasourceModal.tsx 74.24% <0.00%> (-1.15%) ⬇️
... and 188 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 13c51d5...5c9a6af. Read the comment docs.

</DropdownMenu.Item>
)}
<DropdownMenu.Item key="edit">
<a href={navbarRight.user_info_url}>{t('Edit')}</a>
Copy link
Member

@ktmud ktmud Nov 26, 2020

Choose a reason for hiding this comment

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

For some cases, the default user info url doesn't really allow users to edit their profile. Maybe we should add a permission check here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Really? When would a user ever not be able to change their name?

Copy link
Member Author

Choose a reason for hiding this comment

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

After looking around, it seems like maybe only admins can edit users.

So I changed the text here to say "Info" instead, which seems to match the url and view name too, so 🤷

@etr2460 etr2460 force-pushed the erik-ritter--bring-back-profile-link branch from dbdfe12 to 5c9a6af Compare November 27, 2020 04:18
Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

LGTM

@etr2460 etr2460 merged commit f2d9f00 into apache:master Dec 2, 2020
graceguo-supercat pushed a commit to airbnb/superset-fork that referenced this pull request Dec 4, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.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/S 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants