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

Escalation picker fixes and improvements #61

Merged
merged 15 commits into from Dec 14, 2022
Merged

Escalation picker fixes and improvements #61

merged 15 commits into from Dec 14, 2022

Conversation

moonysolari
Copy link
Member

@moonysolari moonysolari commented Dec 14, 2022

This PR addresses several issues of the escalation picker:

  • Improved the error handling by allowing the frontend to show errors messages in the console and push error alerts to the user.
  • Added more error types and corresponding error messages.
  • Prevents the level shown on the picker to exceed the maximum level of the escalation, or to go below 1. An alert is shown when the user attempts to do either of these.
  • Fixed the id of The Baskerville Barney in static/EscalationCodenames.json. It previously had the same id as the Dartmoor Garden Show.
  • Alerts the user upon attempts to set the level for unregistered escalations, likely due to the user not having the Legacy Escalations plugin.

Besides these, it also:

  • Fixes the error message shown when PEACOCK_DEV is set to true and the user attempts to visit localhost.

It does not add peacock-exclusive escalations.

@moonysolari
Copy link
Member Author

moonysolari commented Dec 14, 2022

Side note: Currently there are two files where escalation information resides: static/EscalationCodenames.json and components/contracts/escalationMappings. While I see the reason for having two files, it brings several inconveniences:

  • It is more error-prone (the id of The Baskerville Barney).
  • Efforts have to be made to update one when the other is changed, hence the need to "add" peacock-exclusive escalations to the picker.
  • If a plugin adds new escalations, they will not show up on the picker.
  • The picker will still show escalations that is only supported by a plugin even if the plugin is not installed (e.g. legacy escalations plugin)

It is high time that this setup be reconsidered, now that the escalation system is under rework.

components/index.ts Outdated Show resolved Hide resolved
components/webFeatures.ts Outdated Show resolved Hide resolved
@RDIL
Copy link
Member

RDIL commented Dec 14, 2022

If a plugin adds new escalations, they will not show up on the picker.

If a plugin explicitly adds an escalation to the list, then it will.

components/index.ts Show resolved Hide resolved
components/webFeatures.ts Show resolved Hide resolved
components/webFeatures.ts Show resolved Hide resolved
components/webFeatures.ts Outdated Show resolved Hide resolved
components/webFeatures.ts Show resolved Hide resolved
components/webFeatures.ts Outdated Show resolved Hide resolved
components/webFeatures.ts Show resolved Hide resolved
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.

None yet

2 participants