Skip to content

Conversation

@filippovskii09
Copy link

@filippovskii09 filippovskii09 commented Dec 16, 2025

Description

A fix is added to the DataTable component to properly handle content overflow within table cells

Issue
#4001

Changes

Before

Знімок екрана 2025-12-16 о 17 12 29

After

Знімок екрана 2025-12-16 о 17 13 18

How to test it

You can add this code in to this file src/DataTable/README.md and view local how does it work

() => {
  const TableAction = ({ tableInstance }) => (
    // Here is access to the tableInstance
    <Button onClick={() => console.log('TableAction', tableInstance)}>
      Enroll
    </Button>
  );

  const EnrollAction = ({ selectedFlatRows, ...rest }) => (
    // Here is access to the selectedFlatRows, isEntireTableSelected, tableInstance
    <Button variant="danger" onClick={() => console.log('Enroll', selectedFlatRows, rest)}>
      Enroll
    </Button>
  );

  const AssignAction = (props) => (
    <Button onClick={() => console.log('Assign', props)}>
      Assign
    </Button>
  );

  const ExtraAction = ({ text, selectedFlatRows, ...rest }) => (
    <Button onClick={() => console.log(`Extra Action ${text}`, selectedFlatRows, rest)}>
      {`Extra Action ${text}`}
    </Button>
  );

  return (
    <DataTable
      isSelectable
      itemCount={7}
      tableActions={[
        <TableAction />,
      ]}
      bulkActions={[
        <EnrollAction />,
        <AssignAction />,
        <ExtraAction text="1" />,
        <ExtraAction text="2" />,
      ]}
      additionalColumns={[
        {
          id: 'action',
          Header: 'Action',
          Cell: ({ row }) => <DropdownButton id="dropdown-basic-button" title="Dropdown button">
															<Dropdown.Item href="#/action-1">Action</Dropdown.Item>
															<Dropdown.Item href="#/action-2">Another action</Dropdown.Item>
															<Dropdown.Item href="#/action-3">Something else</Dropdown.Item>
														</DropdownButton>,
        }
      ]}
      data={[
        {
          name: 'Lil Bub',
          color: 'brown tabby',
          famous_for: 'weird tongue',
        },
        {
          name: 'Grumpy Cat',
          color: 'siamese',
          famous_for: 'serving moods',
        },
        {
          name: 'Smoothie',
          color: 'orange tabby',
          famous_for: 'modeling',
        },
        {
          name: 'Maru',
          color: 'brown tabby',
          famous_for: 'being a lovable oaf',
        },
        {
          name: 'Keyboard Cat',
          color: 'orange tabby',
          famous_for: 'piano virtuoso',
        },
        {
          name: 'Long Cat',
          color: 'russian white',
          famous_for:
            'being loooooooooooooooooooooooooooooooooooooooooooooooooooooong',
        },
        {
          name: 'Zeno',
          color: 'brown tabby',
          famous_for: 'getting halfway there'
        },
      ]}
      columns={[
        {
          Header: 'Name',
          accessor: 'name',
        },
        {
          Header: 'Famous For',
          accessor: 'famous_for',
        },
        {
          Header: 'Coat Color',
          accessor: 'color',
        },
      ]}
    >
      <DataTable.TableControlBar />
      <DataTable.Table />
      <DataTable.EmptyTable content="No results found" />
      <DataTable.TableFooter />
    </DataTable>
  )
}

`

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Dec 16, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Dec 16, 2025

Thanks for the pull request, @filippovskii09!

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

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.

@netlify
Copy link

netlify bot commented Dec 16, 2025

Deploy Preview for paragon-openedx-v23 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit d4a706d
🔍 Latest deploy log https://app.netlify.com/projects/paragon-openedx-v23/deploys/69417b839506810008fed947
😎 Deploy Preview https://deploy-preview-4046--paragon-openedx-v23.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Dec 16, 2025
@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.39%. Comparing base (fb678e3) to head (d4a706d).
⚠️ Report is 1 commits behind head on release-23.x.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-23.x    #4046   +/-   ##
=============================================
  Coverage         94.39%   94.39%           
=============================================
  Files               242      242           
  Lines              4296     4301    +5     
  Branches            981     1024   +43     
=============================================
+ Hits               4055     4060    +5     
+ Misses              237      233    -4     
- Partials              4        8    +4     

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

@filippovskii09 filippovskii09 self-assigned this Dec 16, 2025
@filippovskii09 filippovskii09 marked this pull request as ready for review December 17, 2025 11:16
render(<TableRowWrapper value={{}} row={{ ...props, isExpanded: true }} />);
const rows = screen.getAllByRole('row');
expect(rows.length).toEqual(1);
expect(container.querySelector('div')).not.toBeInTheDocument();
Copy link
Contributor

Choose a reason for hiding this comment

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

Before changes in TableCell, the test checks container.querySelector('div') and expects no div, but now TableCell always creates a div with class pgn__data-table-cell-wrap for regular columns.

Let's update this test so that it checks for the absence of a second row (subcomponent) rather than the absence of any div.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants