Skip to content

Editor: Eliminate or refactor store notices constants #11202

@aduth

Description

@aduth

Previously: #9617 (comment)

We now inconsistently use constants for referencing notices by ID in the editor module. The primary need for them is in dismissal upon the start of a new save (e.g. autosave notice, previous save success/error notice).

We should consider one of:

  • Reintroduce consistency, either eliminating all instances of constant references to notice IDs in favor of strings (yes, magic strings), or reintroducing (introducing?) constant reference use.
  • Implement a better system to express and track notices which ought to be dismissed in response to particular actions, like "on next save". See Packages: Add notices package #9617 (comment)

In #9617, it was chosen to not use the constant to avoid a dependency between the component and the store, though this is loosely held.

Metadata

Metadata

Assignees

Labels

FrameworkIssues related to broader framework topics, especially as it relates to javascriptNeeds DevReady for, and needs developer efforts[Package] Editor/packages/editor[Status] In ProgressTracking issues with work in progress[Type] Code QualityIssues or PRs that relate to code quality

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions