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

change: [M3-8533, M3-8761] - Fix firewall rules table and Replace react-beautiful-dnd with dnd-kit lib #11127

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from

Conversation

pmakode-akamai
Copy link
Contributor

@pmakode-akamai pmakode-akamai commented Oct 21, 2024

Description 📝

While working on ticket M3-8533 & PR #11109, we decided to implement/use semantic markup for the Firewall rules table to improve consistency and accessibility, rather than applying a styling band-aid to div grids to make it look like our normal tables. The react-beautiful-dnd library has made us rely on div(Box) grids instead of our normal tables, which complicates using semantic tables/grid layouts because of the draggable elements. Plus, this library has been deprecated (announcement: atlassian/react-beautiful-dnd#2672).

To solve these problems and make better use of our normal tables, switching to dnd-kit(https://dndkit.com/) would be the great idea, which is more popular, supports grid layouts better, and can replace react-beautiful-dnd. This will help us use our semantic tables properly and fix the issues with the Firewall rules table in both dark and light modes.

Changes 🔄

List any change relevant to the reviewer.

  • Used Normal tables instead of Div Box grids
  • Updated PolicyRow
    • Changed it to have borders on all sides.
    • Changed the alignment of the Select and helper text to be aligned with the Action column for screens < 'sm', and with the last column for screens >= 'sm'.
  • Replaced react-beautiful-dnd with dnd-kit lib

Target release date 🗓️

N/A

Preview 📷

Before After
Screenshot 2024-10-21 at 6 21 23 PM Screenshot 2024-10-21 at 6 20 12 PM
Screenshot 2024-10-21 at 6 22 28 PM Screenshot 2024-10-21 at 6 23 24 PM

How to test 🧪

Prerequisites

  • Clear cache or test in Incognito.

Reproduction steps

Verification steps

  • Ensure the table is not broken in both dark and light modes.
  • Verify table across different screen sizes and ensure it matches our normal table colors.
  • Ensure the drag and drop functionality work as expected in different screen sizes.
  • Verify all firewall rule actions work as expected.

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@pmakode-akamai pmakode-akamai self-assigned this Oct 21, 2024
@pmakode-akamai pmakode-akamai marked this pull request as ready for review October 21, 2024 12:56
@pmakode-akamai pmakode-akamai requested a review from a team as a code owner October 21, 2024 12:56
@pmakode-akamai pmakode-akamai requested review from cpathipa and hkhalil-akamai and removed request for a team October 21, 2024 12:56
Copy link

github-actions bot commented Oct 21, 2024

Coverage Report:
Base Coverage: 87.05%
Current Coverage: 87.05%

@pmakode-akamai pmakode-akamai force-pushed the M3-8533-fix-firewall-rules-table-and-replace-react-beautiful-dnd-with-dnd-kit branch from c42e8b1 to 33ded4a Compare October 21, 2024 14:14
Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Fantastic work @pmakode-akamai, and really appreciate considering going with a more holistic refactor, including replacing a non-supported library.

Implementation, markup and styling looks great (in both modes) for the most part, leaving some comments that shouldn't take too much extra work to implement.

Screenshot 2024-10-21 at 10 57 48

Screenshot 2024-10-21 at 11 03 49

packages/manager/package.json Show resolved Hide resolved
@pmakode-akamai pmakode-akamai force-pushed the M3-8533-fix-firewall-rules-table-and-replace-react-beautiful-dnd-with-dnd-kit branch from 33ded4a to e425c84 Compare October 22, 2024 05:51
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.

2 participants