Skip to content

feat(dashboard): Display username in user dropdowns #34356

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

raymondtieu
Copy link

@raymondtieu raymondtieu commented Jul 28, 2025

SUMMARY

Displays the user's username in parentheses in owner/user dropdowns. This helps differentiate between users with the same first and last names.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2025-07-28 at 11 27 07 AM Screenshot 2025-07-28 at 11 27 17 AM Screenshot 2025-07-28 at 11 27 29 AM Screenshot 2025-07-28 at 11 27 49 AM Screenshot 2025-07-28 at 11 28 00 AM

TESTING INSTRUCTIONS

  • Owner and changed by dropdowns should show username next to first and last name

ADDITIONAL INFORMATION

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

* Format the dashboard's owner filter to include username in returned results

* Include username in access options dropdown and in access owners

* Update owner models .text property to include username

* Update expected results of tests with usernames
Copy link

korbit-ai bot commented Jul 28, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@github-actions github-actions bot added the api Related to the REST API label Jul 28, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@raymondtieu raymondtieu marked this pull request as ready for review July 28, 2025 16:41
@dosubot dosubot bot added the change:frontend Requires changing the frontend label Jul 28, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I've completed my review and didn't find any issues.

Files scanned
File Path Reviewed
superset-frontend/src/types/Owner.ts
superset-frontend/src/utils/getOwnerName.ts
superset-frontend/src/pages/CssTemplateList/index.tsx
superset-frontend/src/pages/AnnotationLayerList/index.tsx
superset-frontend/src/pages/RowLevelSecurityList/index.tsx
superset-frontend/src/pages/Tags/index.tsx
superset-frontend/src/views/CRUD/utils.tsx
superset-frontend/src/pages/AlertReportList/index.tsx
superset/reports/api.py
superset-frontend/src/pages/SavedQueryList/index.tsx
superset/dashboards/schemas.py
superset-frontend/src/pages/DashboardList/index.tsx
superset-frontend/src/pages/DatabaseList/index.tsx
superset-frontend/src/pages/ChartList/index.tsx
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
superset/views/base_api.py
superset-frontend/src/pages/DatasetList/index.tsx
superset-frontend/src/features/alerts/AlertReportModal.tsx

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@mistercrunch
Copy link
Member

I think in some instances (ie Preset), the oauth-generated usernames are long and cryptic, wouldn't want to show them. Wondering if email would work better here, or at least feature-flagging it?

@mistercrunch
Copy link
Member

Looking at the code, would be nice to have more DRY types here, doing type composition both on the backend and frontend in a way that's aligned. Lots of repetition for something that should be the same everywhere...

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.89%. Comparing base (604d72c) to head (097d26e).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #34356       +/-   ##
===========================================
+ Coverage        0   72.89%   +72.89%     
===========================================
  Files           0      573      +573     
  Lines           0    41216    +41216     
  Branches        0     4323     +4323     
===========================================
+ Hits            0    30044    +30044     
- Misses          0    10031    +10031     
- Partials        0     1141     +1141     
Flag Coverage Δ
hive 47.24% <60.00%> (?)
mysql 71.90% <100.00%> (?)
postgres 71.95% <100.00%> (?)
presto 50.95% <60.00%> (?)
python 72.85% <100.00%> (?)
sqlite 71.51% <100.00%> (?)
unit 100.00% <ø> (?)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@raymondtieu raymondtieu marked this pull request as draft July 28, 2025 23:39
@sfirke
Copy link
Member

sfirke commented Jul 29, 2025

I think in some instances (ie Preset), the oauth-generated usernames are long and cryptic, wouldn't want to show them. Wondering if email would work better here, or at least feature-flagging it?

Agreed, my userids created by OAuth look like 247f7fcf-07bf-475c-8639-6bd9f9e68be5. Ideally admins could adjust via config:

  1. If this feature is enabled or not
  2. What's shown in parentheses - in my situation I'd use emails, not userids

@sfirke
Copy link
Member

sfirke commented Jul 29, 2025

Also, thanks for creating this feature and welcome to contributing to Superset! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the REST API change:frontend Requires changing the frontend review:draft size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants