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

Redesign notifications #619

Merged
merged 5 commits into from
Oct 13, 2023
Merged

Redesign notifications #619

merged 5 commits into from
Oct 13, 2023

Conversation

mattias800
Copy link
Collaborator

@mattias800 mattias800 commented Oct 11, 2023

  • Introduce DrawerHeader.
  • SearchFilterPanelHeader now uses DrawerHeader.
  • NotificationHeader now uses DrawerHeader.
  • Add NotificationList component, which should wrap notifications.
  • Increase the height of the tab menu to 40px.
  • Update the design of notifications, including a large demo story as designed by Chris.
  • Update CircledIcon stories to use Stena icons (except for spinner).
  • Remove iconSize prop from CircledIcon. Can now only use predefined size variants, which sets both background and icon size.
  • Fix visual bug where button height was too small when icon only.

image

Version

Published prerelease version: v19.0.0-next.15

Changelog

💥 Breaking Change

  • @stenajs-webui/core, @stenajs-webui/elements, @stenajs-webui/panels

🐛 Bug Fix

  • Add prerelease step for next branch #602 (@lindskogen)
  • @stenajs-webui/elements, @stenajs-webui/filter, @stenajs-webui/modal, @stenajs-webui/panels
  • @stenajs-webui/elements, @stenajs-webui/panels
  • @stenajs-webui/filter, @stenajs-webui/modal
  • @stenajs-webui/panels
  • @stenajs-webui/elements, @stenajs-webui/theme
  • @stenajs-webui/elements, @stenajs-webui/grid-export, @stenajs-webui/panels
  • @stenajs-webui/forms, @stenajs-webui/panels, @stenajs-webui/theme
  • @stenajs-webui/core, @stenajs-webui/elements, @stenajs-webui/forms, @stenajs-webui/panels, @stenajs-webui/theme
  • @stenajs-webui/elements
  • @stenajs-webui/calendar, @stenajs-webui/elements, @stenajs-webui/filter, @stenajs-webui/forms, @stenajs-webui/grid-export, @stenajs-webui/grid, @stenajs-webui/panels, @stenajs-webui/theme
  • @stenajs-webui/core, @stenajs-webui/elements, @stenajs-webui/filter, @stenajs-webui/modal, @stenajs-webui/panels, @stenajs-webui/theme
  • @stenajs-webui/core, @stenajs-webui/elements, @stenajs-webui/panels, @stenajs-webui/theme
  • @stenajs-webui/theme
  • @stenajs-webui/filter
  • @stenajs-webui/elements, @stenajs-webui/panels, @stenajs-webui/theme, @stenajs-webui/tooltip
  • @stenajs-webui/elements, @stenajs-webui/modal, @stenajs-webui/panels

⚠️ Pushed to next

Authors: 4

- SearchFilterPanelHeader now uses DrawerHeader.
- NotificationHeader now uses DrawerHeader.
- Add NotificationList component, which should wrap notifications.
- Increase height of tab menu to 40px.
- Update design of notifications, including a large demo story as designed by Chris.
- Update CircledIcon stories to use Stena icons (except for spinner).
- Remove iconSize prop from CircledIcon. Can now only use predefined size variants, which sets both background and icon size.
@github-actions
Copy link

github-actions bot commented Oct 11, 2023

Size Change: 0 B

Total Size: 352 kB

ℹ️ View Unchanged
Filename Size
packages/calendar/dist/index.es.js 15.2 kB
packages/calendar/dist/index.js 12.9 kB
packages/core/dist/index.es.js 5.03 kB
packages/core/dist/index.js 4.65 kB
packages/elements/dist/index.es.js 109 kB
packages/elements/dist/index.js 107 kB
packages/filter/dist/index.es.js 3.79 kB
packages/filter/dist/index.js 3.21 kB
packages/forms/dist/index.es.js 6.85 kB
packages/forms/dist/index.js 6.24 kB
packages/grid-export/dist/index.es.js 2.05 kB
packages/grid-export/dist/index.js 1.99 kB
packages/grid/dist/index.es.js 16.6 kB
packages/grid/dist/index.js 13.8 kB
packages/input-mask/dist/index.es.js 814 B
packages/input-mask/dist/index.js 734 B
packages/modal/dist/index.es.js 3.41 kB
packages/modal/dist/index.js 3.08 kB
packages/panels/dist/index.es.js 7.02 kB
packages/panels/dist/index.js 6.21 kB
packages/redux/dist/index.es.js 3.06 kB
packages/redux/dist/index.js 2.75 kB
packages/select/dist/index.es.js 4.08 kB
packages/select/dist/index.js 3.65 kB
packages/theme/dist/index.es.js 1.99 kB
packages/theme/dist/index.js 2.05 kB
packages/tooltip/dist/index.es.js 2.92 kB
packages/tooltip/dist/index.js 2.72 kB

compressed-size-action

Comment on lines +48 to +57
const getIconSize = (size: CircledIconSizeVariant): number => {
switch (size) {
case "small":
return 16;
case "medium":
return 20;
default:
return exhaustSwitchCaseElseThrow(size);
}
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is background size a string, when this is a number? Use number everywhere!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd argue the opposite.

Icon takes number and then converts it to rem (40 becomes 4.0rem).
Box can take a number, but just adds "px" suffix (40 becomes 40px).

Unit should be explicit so that it is clear where the UI should scale with accessible font size, and where it should not.

Regardless, that is not within the scope of notifications :)
One could argue that the icon should not scale with accessible font size, but that would affect many many components. I'll take it up with Chris and Anton.

…ys-stuff

# Conflicts:
#	packages/filter/src/features/search-filter/components/SearchFilterPanelHeader.tsx
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