Skip to content

feat: Add Invite Admins table with header and kebab menu actions#1744

Open
pbitla-sonata wants to merge 2 commits into
openedx:masterfrom
pbitla-sonata:pbitla/ENT-11262
Open

feat: Add Invite Admins table with header and kebab menu actions#1744
pbitla-sonata wants to merge 2 commits into
openedx:masterfrom
pbitla-sonata:pbitla/ENT-11262

Conversation

@pbitla-sonata
Copy link
Copy Markdown
Contributor

@pbitla-sonata pbitla-sonata commented Jan 16, 2026

  • Added Invite Admins header with title and subtitle
  • Implemented Invite Admins Data Table using Paragon
  • Added admin card layout using Card View
  • Implemented kebab (⋮) action menu using Paragon components
  • Added unit tests
  • TKT ENT-11262, ENT-11236,ENT-11237
    attached screenshot: image (1)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 95.45455% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.15%. Comparing base (9f4b391) to head (5f667e2).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/components/PeopleManagement/index.jsx 77.77% 2 Missing ⚠️
.../components/PeopleManagement/InviteAdminsTable.jsx 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1744      +/-   ##
==========================================
+ Coverage   87.12%   87.15%   +0.02%     
==========================================
  Files         781      785       +4     
  Lines       17886    17947      +61     
  Branches     3748     3738      -10     
==========================================
+ Hits        15583    15641      +58     
- Misses       2228     2231       +3     
  Partials       75       75              

☔ 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.

Copy link
Copy Markdown
Contributor

@hkumar1-sonata hkumar1-sonata left a comment

Choose a reason for hiding this comment

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

Changes Looks Good to me Just added some small suggestions / questions to address.

Comment thread src/components/PeopleManagement/OrgInviteAdminCard.jsx Outdated
</Row>
</Col>
<Col>
<h5 className="pt-2 text-uppercase">Joined org</h5>
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.

can we use ii18 for Joined Org?

const data = camelCaseObject(response.data);
setEnterpriseAdminsTableData({
itemCount: data.count,
pageCount: data.numPages ?? Math.floor(data.count / options.pageSize),
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.

Using Math.floor can undercount pages when the total isn’t a multiple of pageSize, making the last page unreachable.
Suggestion: use Math.ceil(data.count / args.pageSize) to correctly include partial pages and avoid missing records.

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.

Thank you @hkumar1-sonata . Updated

Copy link
Copy Markdown
Contributor

@hkumar1-sonata hkumar1-sonata 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 to me .

Copy link
Copy Markdown
Contributor

@kiram15 kiram15 left a comment

Choose a reason for hiding this comment

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

I don't think this is powered by the backend yet, and cannot be merged in until it is. When it is ready to go, the PR description should have a screenshot or screen recording of the data table and its functionality locally (adding filters, searching, kebab menu actions). I also don't think its a good idea to include so many tickets in just one PR (creating the data table, adding the kebab menu) because it makes it a lot harder to review and iterate.

const data = camelCaseObject(response.data);
setEnterpriseAdminsTableData({
itemCount: data.count,
pageCount: data.numPages ?? Math.ceil(data.count / options.pageSize),
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.

Look at other pageCount instances and follow their example

import { useCallback, useMemo, useState } from 'react';
import { camelCaseObject } from '@edx/frontend-platform/utils';
import { logError } from '@edx/frontend-platform/logging';
import { debounce, snakeCase } from 'lodash-es';
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.

Organize imports into external (react and lodash-es in this case) and then edx packages.


/* ---------------- MOCK PARAGON ---------------- */

jest.mock('@openedx/paragon', () => {
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.

It's not helpful to mock paragon in this way, we should directly importing the Card component

import { useIntl, FormattedMessage } from '@edx/frontend-platform/i18n';
import {
ActionRow, Button, Skeleton, Toast, useToggle,
Tabs, Tab,
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.

Alphabetize imports and keep on one line

import InviteAdminsTable from './InviteAdminsTable';

const PeopleManagementPage = ({ enterpriseId }) => {
const PeopleManagementPage = ({ enterpriseId, adminsTabEnabled }) => {
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 will have to have the feature flag code merged in before we attempt this PR, because otherwise where is this bool being passed from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants