Skip to content

Vanessa/2885 workspace side notification#3371

Merged
chrisolsen merged 1 commit intodevfrom
vanessa/2885-workspace-side-notification
Mar 19, 2026
Merged

Vanessa/2885 workspace side notification#3371
chrisolsen merged 1 commit intodevfrom
vanessa/2885-workspace-side-notification

Conversation

@vanessatran-ddi
Copy link
Collaborator

@vanessatran-ddi vanessatran-ddi commented Jan 28, 2026

Before (the change)

After (the change)

I also added the docs:
image

Desktop:
image

When menu is collapsed:
image

For mobile:
image

For any slot content (not only notification case)
image

image

Make sure that you've checked the boxes below before you submit the PR

  • I have read and followed the setup steps
  • I have created necessary unit tests
  • I have tested the functionality in both React and Angular.

Steps needed to test

@vanessatran-ddi vanessatran-ddi self-assigned this Jan 28, 2026
@vanessatran-ddi vanessatran-ddi marked this pull request as draft January 28, 2026 01:10
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 4f494fb to a47e550 Compare January 28, 2026 21:57
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from e36d65b to 5d7f524 Compare January 29, 2026 21:27
@vanessatran-ddi vanessatran-ddi marked this pull request as ready for review January 29, 2026 21:27
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 5d7f524 to dc473e8 Compare January 30, 2026 16:42
@vanessatran-ddi vanessatran-ddi marked this pull request as draft February 2, 2026 14:53
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch 2 times, most recently from 1af4d29 to 0050a8b Compare February 2, 2026 20:27
@vanessatran-ddi vanessatran-ddi marked this pull request as ready for review February 2, 2026 20:28
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 0050a8b to 64c925d Compare February 2, 2026 22:22
Copy link
Collaborator

@bdfranck bdfranck left a comment

Choose a reason for hiding this comment

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

Looking great, @vanessatran-ddi! I left a couple comments on some minor things that I noticed.

@chrisolsen chrisolsen removed their request for review February 4, 2026 22:09
@vanessatran-ddi vanessatran-ddi marked this pull request as draft February 5, 2026 16:09
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch 2 times, most recently from ab29b50 to 9eebfc2 Compare February 7, 2026 00:56
@vanessatran-ddi vanessatran-ddi marked this pull request as ready for review February 7, 2026 00:56
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 9eebfc2 to 89baa08 Compare February 9, 2026 19:17
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 89baa08 to 762d405 Compare February 9, 2026 21:47
@vanessatran-ddi
Copy link
Collaborator Author

I press a wrong button

export let ml: Spacing = null;

export let minWidth: string = "";
export let justifyContent: string = "";
Copy link
Collaborator

Choose a reason for hiding this comment

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

There could be a type that is created for these css values, both here and in the React/Angular components to make things clearer.

@vanessatran-ddi vanessatran-ddi marked this pull request as draft February 26, 2026 16:27
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 6f03cf9 to 8d19761 Compare March 11, 2026 20:43
});

describe("Desktop viewport", () => {
it("should open notification panel in a popover", async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On Firefox this test will fail.

Image

I tested on Firefox manually and here is how notification popover behaves

Image Firefox version: 145.0.2 (aarch64)

It is related to this issue #3540 (so not related to this PR)

@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from b3014dd to b4dfa29 Compare March 17, 2026 17:42
describe("Desktop viewport", () => {
// CSS anchor positioning is not supported in Firefox/Safari 18 (see #3540)
const isFirefox = navigator.userAgent.includes("Firefox");
it.skipIf(isFirefox)("should open notification panel in a popover", async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On Firefox this test will fail.

Image

I tested on Firefox manually and here is how notification popover behaves

Image Firefox version: 145.0.2 (aarch64) It is related to this issue https://github.com//issues/3540 (so not related to this PR)

I also left a comment on slack

// (MenuButton, AppHeader, AppHeaderMenu, Dropdown)
if (_isOpen) {
dispatch(_rootEl, "_open");
dispatch(_rootEl, "_open", {}, { bubbles: true });
Copy link
Collaborator Author

@vanessatran-ddi vanessatran-ddi Mar 17, 2026

Choose a reason for hiding this comment

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

To bubble up to WorkSideMenuItem

Image

@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 005b533 to 4bda9dd Compare March 17, 2026 19:14
@vanessatran-ddi vanessatran-ddi marked this pull request as ready for review March 17, 2026 19:18
_updateDateHeadersTimeout = performOnce(
_updateDateHeadersTimeout,
updateDateHeaders,
1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

But is there a reason? 1ms is pretty small and if one event is greater than this it will then fire more than once. The reason why 100 was used was to hopefully guarantee everything works. Was the 99ms noticeably slow?

export let leadingicon: GoAIconType;
/** Icon displayed after the button text. */
export let trailingicon: GoAIconType;
export let disabled: string = "false";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason this is a string rather than boolean? Now that we can define the props in the svelte:options there is no need to use strings and the toBoolean function.

Comment on lines +26 to +31
/** Action identifier passed in click events for event delegation patterns. */
export let action: string = "";
/** Single argument value passed with the action in click events. */
export let actionArg: string = "";
/** Multiple argument values passed with the action in click events. */
export let actionArgs: Record<string, unknown> = {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason the props are being moved around? It is adding to the number of changed lines.

Comment on lines +307 to +314
_rootEl.removeEventListener("_blurItem", hideTooltip);
_rootEl.removeEventListener("_toggle", toggleMenu);
_rootEl.removeEventListener(
"_desktopPopoverOpen",
onDesktopPopoverOpen as EventListener,
);
_rootEl.removeEventListener("_desktopPopoverClose", onDesktopPopoverClose);
_rootEl.removeEventListener("keydown", handleMenuKeyDown);
Copy link
Collaborator

Choose a reason for hiding this comment

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

none of the rootEl removeEventListeners are needed as they will be removed when the element is removed from the DOM

/** Sets a data-testid attribute for automated testing. */
export let testid: string = "drawer";
/** Controls visibility of the close button and header. */
export let closeButton: "show" | "none" = "show";
Copy link
Collaborator

Choose a reason for hiding this comment

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

This property name is a little vague. closeButtonVisibility would make more sense.

Comment on lines +266 to +267
const panel = result.getByTestId("work-space-side-notification-panel");
expect(panel).toBeTruthy();
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am pretty sure this has been mentioned before, but the getBy.. functions always return a Locator object, which is always truthy, so there is no need to run the assertion on line 267. These locators should be declared closer to the top of the function if possible. And all locators should not be within a waitFor block otherwise it defeats the purpose of the waitFor.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @chrisolsen I may miss this as this PR was created almost 2 months ago.. I will check on this browser test file again.

Copy link
Collaborator

Choose a reason for hiding this comment

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

here too and the others in these changes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let me try again, I thought after markAllBtn.click at line 315, we should safely query after waitFor

Copy link
Collaborator

Choose a reason for hiding this comment

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

The locators don't have to be created when something is visible.

@Spark450 Spark450 added 1.0 P1 Priority 1 (must have): Prevents product teams from adopting/using DS 2.0 as intended at launch. and removed 1.0 labels Mar 19, 2026
@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from 175c337 to c07965a Compare March 19, 2026 20:55
/** Sets a data-testid attribute for automated testing. */
export let testid: string = "drawer";
/** Controls visibility of the close button and header. */
export let closeButtonVisibility: "show" | "none" = "show";
Copy link
Collaborator

Choose a reason for hiding this comment

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

For consistency with the other components that have a visibility property, instead of show|none use "visible" | "hidden". I missed this the first time 😞

@vanessatran-ddi vanessatran-ddi force-pushed the vanessa/2885-workspace-side-notification branch from c07965a to 57d7f17 Compare March 19, 2026 22:05
@chrisolsen chrisolsen merged commit eafe34f into dev Mar 19, 2026
4 checks passed
@chrisolsen chrisolsen deleted the vanessa/2885-workspace-side-notification branch March 19, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Priority 1 (must have): Prevents product teams from adopting/using DS 2.0 as intended at launch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification center

6 participants