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

Quick misc fixes #1501

Merged
merged 10 commits into from
Oct 17, 2023
Merged

Quick misc fixes #1501

merged 10 commits into from
Oct 17, 2023

Conversation

cayb0rg
Copy link
Contributor

@cayb0rg cayb0rg commented Oct 3, 2023

  • Adds simple null checks on data before accessing properties on data (If data is null, that is usually a sign something went wrong on the server; this is just a front-end band-aid)
  • Fixes notification error message from appearing in every notification row
  • Adds widget link to request access notification
  • Fixes time conversion in unavailable widget messages (Instance open/close time parsing can be invalid #1509)
  • Adds styling to Instance Manager inside User Admin
  • Encodes apostrophes in admin instance search query

@cayb0rg cayb0rg changed the title Quick null checks on API call results Quick misc fixes Oct 3, 2023
Copy link
Member

@clpetersonucf clpetersonucf left a comment

Choose a reason for hiding this comment

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

I don't see any issues here, approved

setCreatorState({...creatorState, invalid: false})
setInstance({ ...instance, qset: data })
}
if ( (data != null ? data.title : undefined) === 'Permission Denied' || (data && data.title === 'error')) {
Copy link
Member

Choose a reason for hiding this comment

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

This check won't catch data == null, but the API should never send a null object for this request. If an instance qset isn't found it sends a dummy one instead, so this should be sufficient.

@@ -215,7 +215,7 @@ const MyWidgetsPage = () => {
widgetName: inst.widget.name,
dir: inst.widget.dir,
successFunc: (data) => {
if (!data || (data.type == 'error'))
if (data && (data.type == 'error'))
Copy link
Member

Choose a reason for hiding this comment

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

The lack of a null check here is probably fine since this is coming from the useDeleteWidget mutation which handles errors.

@clpetersonucf clpetersonucf changed the base branch from issue/support-dashboard-in-react to dev/10.0.1 October 12, 2023 18:28
Copy link
Member

@clpetersonucf clpetersonucf left a comment

Choose a reason for hiding this comment

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

Re-upping approval.

@clpetersonucf clpetersonucf merged commit 44152c3 into ucfopen:dev/10.0.1 Oct 17, 2023
2 checks passed
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