Skip to content

Improvements to interactive modal component - #289

Open
LaurenAllin wants to merge 5 commits into
USACE:mainfrom
LaurenAllin:PR-194-Interactive-Modal
Open

LaurenAllin wants to merge 5 commits into
USACE:mainfrom
LaurenAllin:PR-194-Interactive-Modal

Conversation

@LaurenAllin

@LaurenAllin LaurenAllin commented Jun 22, 2026 •

Copy link
Copy Markdown

Summary

  • Primary Objective: User Interface improvements to the interactive modal component
  • Previous Pull Request: Interactive Modal Interactive Modal #194

Checklist

  • Added option to have a background color/overlay color
  • Improved appearance of modal box
  • Used the user's window height and width to set max and min bounds
  • Converted from mouse based events to pointer based events to enable inputs from all types of screens/devices
  • Allowed option for user to define default modal size

Release impact

  • Previous pull request was labelled as Major-Bump

@willbreitkreutz

Copy link
Copy Markdown
Contributor

This caller still passes buttons, but Modal now only renders footer. That drops the DoD warning’s “I Agree” button, which is a blocking regression. Either migrate this usage to footer or keep buttons as a backwards-compatible alias.

@willbreitkreutz

Copy link
Copy Markdown
Contributor

@LaurenAllin I guess there were more comments than I initially thought, but pretty minor changes. You'll want to rebase against main so you have the most recent changes from that branch to keep this one clean. Let me know if you need any help getting that to work.

<div className="gw-fixed gw-inset-0 gw-w-screen gw-overflow-auto gw-p-4">
<div className="gw-flex gw-min-h-full gw-items-center gw-justify-center">
<div
style={

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 style expression uses the comma operator, so the first object with background, padding, overflow, borderRadius, and zIndex is discarded. The wrapper only receives the conditional width/height styles. This should be one merged style object.

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.

or should use expansion on the objects so that the results of the conditional are merged with the initial object

unmount={unmount}
role={role}
className={gwMerge("gw-relative", "gw-z-[200]", className)}
style={{

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.

The new background prop is applied to the Dialog, but the actual DialogBackdrop still has a hard-coded gw-bg-black/30. That means consumers cannot really control the overlay color. The prop should be applied to the backdrop or the hard-coded backdrop class should be conditional.

width: widthClass,
height: null,
});
const [position, setPosition] = useState({ x: 0, y: 0 }); //May not be needed

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.

I think this should be removed, looks to be unused

window.removeEventListener("pointercancel", handleRelease);
};
// Ensure all values read by handleMove are in the dependency array to prevent stale closures
}, [resizing, offset, windowWidth, windowHeight]);

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.

handleMove is not in the dependency array, throwing an eslint warning.

This branch has not been deployed

No deployments
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