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

Various bug fixes #185

Merged
merged 9 commits into from
Nov 21, 2024
Merged

Various bug fixes #185

merged 9 commits into from
Nov 21, 2024

Conversation

nofurtherinformation
Copy link
Collaborator

@nofurtherinformation nofurtherinformation commented Nov 18, 2024

Copy link
Collaborator

@raphaellaude raphaellaude left a comment

Choose a reason for hiding this comment

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

LGTM and everything was working nicely in https://districtr-v2-185-app.fly.dev/

Comment on lines +26 to +28
<Text as="p" mb={'4'}>
{!!errorNotification?.severity && <i>Severity: {errorNotification.severity}</i>}
</Text>
Copy link
Collaborator

Choose a reason for hiding this comment

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

PP: Not sure we need the severity here.

Q: Do you know if Sentry will capture these errors? It would be good to still have them tracked there but not pressing to figure that out

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm using severity as a way to sort alert type - dialog, toast, silent log ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not super familiar with sentry but I'm sure this can integrate with it

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense – just not sure it needs to be exposed to the user!

@@ -16,6 +17,7 @@ export default function Map() {
<MapComponent />
<MobileTopNav />
<MapContextMenu />
<ErrorNotification />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q: Should this be further up in the DOM in case other pages eventually need it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Possibly but I'm not sure if that will mess up SSR stuff

import {AlertDialog, Button, Flex, Text} from '@radix-ui/themes';
import * as Toast from '@radix-ui/react-toast';

export const ErrorNotification = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

PP: Good for now but there's probably an argument to be made either way that this should be an error dialog.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Severity 1 is a dialog!

set({
errorNotification: {
severity: 2,
message: `Breaking this geography failed. Please refresh this page and try again. If this error persists, please share the error code below the Districtr team.`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thank you!

@nofurtherinformation nofurtherinformation merged commit 343f94c into main Nov 21, 2024
1 check passed
@nofurtherinformation nofurtherinformation deleted the save-to-recents-fixes branch November 21, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants