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

Danielle/482 notifications needs a way to exit the modal #609

Merged

Conversation

Danielle254
Copy link
Contributor

@Danielle254 Danielle254 commented Oct 11, 2024

Before
before PR

  • Changed background color to muted for better contrast
  • Added button to manually close the alert before it expires
  • Button is styled with ghost and standard icon size
  • Close button is accessible by keyboard and labeled

10_11 screen

Copy link

appwrite bot commented Oct 11, 2024

Gridiron Survivor Application 6616ea581ef9f5521c7d

Function ID Status Action
Your function deployment has failed. Please check the logs for more details and retry.

Project name: Gridiron Survivor Application
Project ID: 6616ea581ef9f5521c7d

Function ID Status Action
userAuth 6626fef885a9f630442b failed Failed View Logs

Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.

💡 Did you know?
You can use Avatars API to generate QR code for any text or URLs

Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gridiron-survivor ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 4:26pm
gridiron-survivor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 4:26pm

@shashilo
Copy link
Collaborator

shashilo commented Oct 14, 2024

Remove the orange hover background. Just make the icon color 50% lighter on hover.
image

@@ -5,17 +5,17 @@ import * as React from 'react';
import { cva, type VariantProps } from 'class-variance-authority';

const alertVariants = cva(
'relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
'relative w-full rounded-lg border p-4 [&>svg~*]:ml-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
Copy link
Collaborator

Choose a reason for hiding this comment

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

How come these styles were updated? This ticket only pertains towards the close button.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shashilo this styling was causing the button to be rendered distorted. I could not find another workaround.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shashilo this is now fixed

components/AlertNotification/AlertNotification.test.tsx Outdated Show resolved Hide resolved
components/AlertNotification/AlertNotification.tsx Outdated Show resolved Hide resolved
);
const dismissButton = screen.getByTestId('dismiss-alert-btn');
fireEvent.click(dismissButton);
expect(spyToast).toHaveBeenCalled();
Copy link
Collaborator

Choose a reason for hiding this comment

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

great job on the spy!

Copy link
Member

@ryandotfurrer ryandotfurrer left a comment

Choose a reason for hiding this comment

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

Braydon and Shashi covered my other comments, so I've just left a couple of nits. Once the other requested changes from Braydon and Shashi are taken care of, I will approve this PR regardless of the status of my "nits".

@Danielle254
Copy link
Contributor Author

Remove the orange hover background. Just make the icon color 50% lighter on hover. image

@shashilo this would involve creating a new button style rather than using an existing ("ghost") style. Are you OK with that?

@ryandotfurrer
Copy link
Member

Remove the orange hover background. Just make the icon color 50% lighter on hover. image

@shashilo this would involve creating a new button style rather than using an existing ("ghost") style. Are you OK with that?

@Danielle254 the buttons can accept additional classNames where defined.

Since this is only being used in one place (currently) I'd just adjust the button itself. Or if @shashilo prefers, we can edit the icon variety.

Copy link
Member

@ryandotfurrer ryandotfurrer left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@Danielle254 Danielle254 merged commit 6bc5b39 into develop Oct 16, 2024
5 checks passed
@Danielle254 Danielle254 deleted the danielle/482-notifications-needs-a-way-to-exit-the-modal branch October 16, 2024 17:19
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.

4 participants