Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Change Proposal: Snackbar notification system

未关闭
#332 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
react, typescript

调研方向

Start by reviewing the MuiSnackbar, MuiSnackbarContent, and MuiAlert overrides in DiamondDSTheme.ts, along with the Snackbar story. Compare the proposed SnackbarProvider approach with the existing component usage and define how stacking, queueing, theming, and notification guidance should fit together. Done means the accepted design is implemented with usage documentation covering placement, duration, severity, and inline Alert choices.

由索引模型根据 Issue 内容生成。

描述

needs-triage

What is being proposed?

Introduce a snackbar notification system for stacking and queueing multiple notifications (e.g. notistack or an equivalent MUI-compatible library), plus written guidance on when and how to use it.

(was raised by several issues in i15-1/Atlas project)

Why is this needed?

Today the DS only themes MUI's bare Snackbar/Alert (see MuiSnackbar/MuiSnackbarContent/MuiAlert overrides in DiamondDSTheme.ts and the Snackbar story). Each consumer wires its own open state and there's no way to stack or queue multiple notifications, and no guidance on when a snackbar is appropriate versus an inline Alert.

MUI/Material's own guidance recommends showing only one snackbar at a time, but our platform needs to support multiple concurrent, stacked notifications, as seen in systems such as IBM Carbon's notification component.

What will change?

  • Behaviour: adds a SnackbarProvider (or similar) enabling stacking/queueing of multiple notifications
  • Component props or usage: consumers trigger notifications imperatively instead of managing open state themselves
  • New dependency: notistack (or equivalent), themed to match existing MuiAlert/MuiSnackbarContent styling
  • Documentation: usage guidance covering when to use a snackbar vs. inline Alert, severity/variant mapping, duration and placement conventions

Interface changes (if any)

const { enqueueSnackbar } = useSnackbar();
enqueueSnackbar("Saved", { variant: "success" });

Breaking change?

  • No

Next steps

A maintainer will review this issue.
If accepted, it will be marked as accepted and a PR may then be opened.

主要语言
TypeScript
星标
9
派生
3
平均合并
6 天 7 小时
30 天内合并 PR
20

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DiamondLightSource/sci-react-ui 的其他 Issue

查看 DiamondLightSource/sci-react-ui 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。