Skip to content

refactor: reorganize user table to match team members order and styles - #255

Open
dcoa wants to merge 11 commits into
openedx:masterfrom
eduNEXT:dcoa/refactor-user-table
Open

dcoa wants to merge 11 commits into
openedx:masterfrom
eduNEXT:dcoa/refactor-user-table

Conversation

@dcoa

@dcoa dcoa commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

This PR reorganize the columns on the user roles assignments table to match the same order as the subtable in the main page: Role - Scope - Organization.

image

In addition to the order the PR does:

  • Use the same component to display the Role as badge with the icon. It also keep the min-width the same for all tables.
  • Use the same component to display the Organization so it now also display the icon.
  • Update scope to display the name. (This change depends on feat: align user assignments endpoint with inline assignments shape openedx-authz#518).
  • Use IconButton for all the disabled delete actions so it keeps the same icon size as the active action. Centered.
  • Pin column widths to avoid resizing due the content. It is applied to >=md brackpoint. Small screens keep the auto resize.
  • Update the Delete Action modal to display the correct scope information.

Closes openedx/openedx-authz#512

Design reference https://www.figma.com/design/xnmQJq1cTRVqNrs31R8zDM/AuthZ---v2?node-id=40001052-1411&t=xCeOPbmVtz27pLdy-0

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Oct 9, 2026
@openedx-webhooks

openedx-webhooks commented Oct 9, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @dcoa!

This repository is currently maintained by @openedx/committers-frontend.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.70%. Comparing base (e2a8609) to head (044ecf9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #255      +/-   ##
==========================================
- Coverage   98.71%   98.70%   -0.02%     
==========================================
  Files          80       80              
  Lines        1402     1385      -17     
  Branches      472      468       -4     
==========================================
- Hits         1384     1367      -17     
  Misses         18       18              

☔ View full report in Codecov by Harness.
📢 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.

@dcoa
dcoa marked this pull request as ready for review October 9, 2026 09:27
Comment thread src/authz-module/audit-user/index.tsx Outdated
Header: getCellHeader('role', formatMessage(messages['authz.user.table.role.column.header']), columnsWithFiltersApplied),
accessor: 'role',
Cell: RoleCell,
Cell: RoleBadgeCell,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Figma shows this cell as a simple text not as a badge, Is this modification discussed with the design team?

@dcoa dcoa Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I understand there is not Figma for this particular change but that was discussed with product. @BryanttV could you help me to clarify this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Update we validate this view with the design team and agreed to make some changes the final view is here https://www.figma.com/design/xnmQJq1cTRVqNrs31R8zDM/AuthZ---v2?node-id=40001052-1411&t=xCeOPbmVtz27pLdy-0

@dcoa
dcoa force-pushed the dcoa/refactor-user-table branch from d95e784 to bae4a6f Compare October 12, 2026 02:43

@bra-i-am bra-i-am left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks great for me and is working as expected!!

This is unrelated, but I'm pointing it out to keep in mind for future efforts; being a course_beta_tester also adds a row in the roles table. I think it could be mapped (MAP_ROLE_KEY_TO_LABEL) too

Screencast.from.19-10-26.15.40.15.webm

},
'authz.user.table.showing.roles.text': {
id: 'authz.user.table.showing.roles.text',
defaultMessage: 'Showing {pageSize, plural, one {# role} other {# roles}} of {itemCount}.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
defaultMessage: 'Showing {pageSize, plural, one {# role} other {# roles}} of {itemCount}.',
defaultMessage: 'Showing {pageSize, plural, one {# role} other {# roles}} of {itemCount}',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To keep the same behavior as Paragon, we should keep the period at the end of the message.

th:has(> .authz-col-org) { width: 25.5%; } // Organization
th:has(> .authz-col-permissions) { width: 16%; } // "133 granted" and the expand chevron
th:has(> .authz-col-actions) { width: 7%; } // Actions
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit:
Maybe use a closer Figma color

Image
Suggested change
}
}
.pgn__data-table {
th {
background-color: var(--pgn-color-primary-100);
color: var(--pgn-color-primary-500);
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I understand we want to keep align the styles across applications and closer to Paragon. due that, the best is keep the default styles for paragon table. That also align with team members table

@dcoa

dcoa commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

About:

This is unrelated, but I'm pointing it out to keep in mind for future efforts; being a course_beta_tester also adds a row in the roles table. I think it could be mapped (MAP_ROLE_KEY_TO_LABEL) too

There is already an issue about it #179 and is currently under validation. Thank you for point out :)

The only thing that I will do for now related to it is display the Permissions as plain text instead of a expansible that show nothing.

image

PD:
@bra-i-am, happened that most of the nits that you suggested #271 where already here so I just included a couple that where missing.

dcoa and others added 10 commits October 22, 2026 12:21
… breakdown

The audit user table listed Role, Organization, Scope. Reorder it to Role, Scope,
Organization so it reads the same as the role breakdown in the Team Members table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The user assignments endpoint now returns scope_display_name and no longer
returns is_superadmin. Render the scope column with the same ScopeNameCell
the team members role breakdown uses, moved to the shared TableCells, so
both tables name scopes alike, and drop the unused isSuperadmin field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…reakdown

Render the user assignments role and organization columns with the role
badge and the org icon cell the team members breakdown uses, moved to the
shared TableCells, so all three columns carry the same icons in both tables.
The Super Admin / Global Staff row highlight relied on RoleCell's data-role
attribute, so it goes with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kground

The 11rem floor was scoped to the Team Members collapsed row, so badges in the
role breakdown and the user assignments table hugged their label and differed
in width. Apply it to the badge itself, and switch its background to gray-100.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The table used auto layout, so each page's content resized the columns.
Each column gets a headerClassName and widths follow its proportions from md up:
role and organization take 18% and actions 7%, permissions get 16% and the toggle
15%, and scope takes the rest, so every column fits at 1440px. The permissions count
stays on one line, and the actions column is centered like the team members one.
For small screens keep the auto-sizing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…utton

The admin role delete action was a bare Icon with side margins, so it sat
off-center in the actions column. Swapping in a disabled IconButton broke the
tooltip, since Paragon sets pointer-events: none on disabled icon buttons.
DisabledCourseActionButton already worked around that with a hoverable wrapper,
so it becomes DisabledActionButton with a tooltip prop and serves the admin role
and course-disabled cases alike.

Every delete button is size="sm", like the team members view button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The confirmation showed the scope key. It now names the course or library
by its display name, and for a wildcard scope says what it reaches: every
course or library of the organization, or of the platform. The last-role
warning no longer talks about a single scope, since it shows whenever the
user is about to lose their only role.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dcoa
dcoa force-pushed the dcoa/refactor-user-table branch from 0e537ce to 044ecf9 Compare October 22, 2026 04:07
@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: In Eng Review

Development

Successfully merging this pull request may close these issues.

Update the user assignments table to use the aligned assignments API response

5 participants