Skip to content

Refactor alert context to data-driven model - #2830

Open
marianards wants to merge 1 commit into
equinor:mainfrom
marianards:alerts-refactor
Open

Refactor alert context to data-driven model#2830
marianards wants to merge 1 commit into
equinor:mainfrom
marianards:alerts-refactor

Conversation

@marianards

Copy link
Copy Markdown
Contributor

Ready for review checklist:

  • A self-review has been performed
  • All commits run individually
  • Temporary changes have been removed, like console.log, TODO, etc.
  • The PR has been tested locally
  • A test has been written
    • This change doesn't need a new test
  • Relevant issues are linked
  • Remaining work is documented in issues
    • There is no remaining work from this PR that require new issues
  • The changes does not introduce dead code as unused imports, functions etc.

Comment on lines +18 to +23
| { kind: 'failedMissions'; missions: Mission[] }
| { kind: 'autoScheduleFail'; failedMissions: AutoScheduleFailedMissionDict }
| { kind: 'dock'; dockType: AlertType }
| { kind: 'requestFail'; message: string }
| { kind: 'failure'; title: string; message: string }
| { kind: 'info'; title: string; message: string }

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.

Could "kind" be an enum? That would make it easier to refactor and expand in the future.

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.

It would also mean that developers wouldn't need to check the content file to see what options they have.

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