Skip to content

Improved Error Messages in PreferencesComponent.tsx#1603

Draft
BrianRaymond800 wants to merge 1 commit into
OpenEnergyDashboard:developmentfrom
BrianRaymond800:issue19
Draft

Improved Error Messages in PreferencesComponent.tsx#1603
BrianRaymond800 wants to merge 1 commit into
OpenEnergyDashboard:developmentfrom
BrianRaymond800:issue19

Conversation

@BrianRaymond800
Copy link
Copy Markdown

Description

This is a simple change to address a concern from Issue Nineteen. Most of Issue Nineteen's problems have already been fixed by other contributors, but this pull request addresses an issue with error messages that were not fully descriptive.

Fixes Issue 19

Type of change

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

A few of the areas mentioned in Issue 19 could have further error message improvements in order to be more clear for users, but this would best be done in a larger assessment of all of the routes and their associated error messages.

Copy link
Copy Markdown
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

@BrianRaymond800 Thank you for addressing this issue. I made a couple of comments to consider. In the bigger picture, I looked (may not have found every one) but this change makes this warning message different than other pages:

  1. The date range min/max on the same page.
  2. The reading min/max on the unit page.
  3. Both of these on the meter page.

It is a little nicer that your change consistently shows about negative values but I think OED wants to be consistent. Assuming the other comments are resolved, a careful check for all other places with changes to be consistent would be needed to move this forward.

Please let me know if anything is not clear or you have thoughts/questions.

/>
) : (
<FormattedMessage
id="error.bounds"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There are formatting issues with this file: 1) wrong indenting; 2) space indenting instead of tabs. VSC can fix this with commands.

) : (
<FormattedMessage
id="error.greater"
values={{ min: Number(localAdminPref.defaultWarningFileSize) }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This used to check for max of infinity. Now one can enter a really big value and submit it. Then it fails to save. I prefer the other way.

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