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

Improved UX for Admin Notification Page #490

Conversation

ryandotfurrer
Copy link
Member

Closes #474

Enhance the user experience of the existing admin notification page to improve its formatting and usability.

Acceptance Criteria:

  • Review and redesign the layout of the admin notification page for better organization and clarity.
  • Improve the visual hierarchy of notification elements for easier scanning and management.
  • Ensure the design is consistent with the overall admin panel aesthetics.

Video Demo

GIS.Notifcaion.UX.Demo.mp4

Copy link

vercel bot commented Aug 31, 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 12, 2024 1:37am
gridiron-survivor-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 12, 2024 1:37am

Copy link

appwrite bot commented Aug 31, 2024

Gridiron Survivor Application 6616ea581ef9f5521c7d

Function ID Status Action
Your function has been successfully deployed.

Project name: Gridiron Survivor Application
Project ID: 6616ea581ef9f5521c7d

Function ID Status Action
userAuth 6626fef885a9f630442b ready Ready 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?
Appwrite has a Discord community with over 16 000 members. Come join us!

app/(admin)/admin/notifications/page.tsx Outdated Show resolved Hide resolved
app/(admin)/admin/notifications/page.tsx Outdated Show resolved Hide resolved
app/(admin)/admin/notifications/page.tsx Show resolved Hide resolved
app/(admin)/admin/notifications/page.tsx Outdated Show resolved Hide resolved
app/(admin)/admin/notifications/page.tsx Show resolved Hide resolved
components/Textarea/Textarea.test.tsx Show resolved Hide resolved
components/Textarea/Textarea.test.tsx Show resolved Hide resolved
components/Textarea/Textarea.test.tsx Outdated Show resolved Hide resolved
components/Textarea/Textarea.tsx Show resolved Hide resolved
components/Textarea/Textarea.tsx Show resolved Hide resolved
…radiogroup and messages on notifications page
app/(admin)/admin/notifications/page.tsx Outdated Show resolved Hide resolved
app/(admin)/admin/notifications/page.tsx Outdated Show resolved Hide resolved
app/(admin)/admin/notifications/page.tsx Outdated Show resolved Hide resolved
@shashilo
Copy link
Collaborator

shashilo commented Oct 7, 2024

This screen should have the ability to All users, users in a specific league only, etc.

@ryandotfurrer
Copy link
Member Author

This screen should have the ability to All users, users in a specific league only, etc.

@shashilo this was discussed previously in how we want to handle it.

I can grab the drop-down we have on the homepage if you'd like. Or, my original thought was that it would be based on what league was chosen in the AdminMenu on the top of the admin layout.

I also have another task that was to create the league choice interface.

image

…dd state to control which "group" value is displayed when the user makes a radio button selection
Comment on lines -1 to -4
NEXT_PUBLIC_APPWRITE_API_URL=
NEXT_PUBLIC_APPWRITE_PROJECT_ID=
NEXT_PUBLIC_APPWRITE_DATABASE_ID=
APPWRITE_API_KEY=
Copy link
Contributor

@choir241 choir241 Oct 6, 2024

Choose a reason for hiding this comment

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

Q: Why was this deleted?

} catch (error) {
console.error('Error Sending Email:', error);
Copy link
Contributor

@choir241 choir241 Oct 6, 2024

Choose a reason for hiding this comment

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

nit: Please remove console.error as throw new Error stack already takes care of this. And update the argument in throw new Error accordingly

Comment on lines +71 to +73
const fetchData = async (): Promise<void> => {
await getLeagueData();
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: How come we don't just move the getLeagueData() function logic inside fetchData()?

* Focuses the textarea.
* @returns {void}
*/
focus: (): void => textAreaRef.current?.focus(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: How come we're using the ? operator here if textAreaRef.current is defined as HTMLTextAreaElement, but not HTMLTextAreaElement | undefined?

textAreaRef.style.height = `${scrollHeight + offsetBorder}px`;
}
}
}, [textAreaRef, triggerAutoSize]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: If we remove textAreaRef and/or triggerAutoSize, does this useEffect logic still function as intended?

Comment on lines +29 to +34
if (textAreaRef) {
if (init) {
textAreaRef.style.minHeight = `${minHeight + offsetBorder}px`;
if (maxHeight > minHeight) {
textAreaRef.style.maxHeight = `${maxHeight}px`;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: There's a lot of nesting here, can we not combine textAreaRef and init into the same conditional if statement?

});

it('respects minHeight and maxHeight props', () => {
render(<Textarea minHeight={100} maxHeight={200} />);
Copy link
Contributor

@choir241 choir241 Oct 11, 2024

Choose a reason for hiding this comment

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

Q: Shouldn't this be 102px if you're testing for the min height to be 102px?

});

it('auto resizes based on content', () => {
render(<Textarea minHeight={100} maxHeight={200} />);
Copy link
Contributor

@choir241 choir241 Oct 11, 2024

Choose a reason for hiding this comment

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

Q: Shouldn't this be 102px if you're testing for the min height to not be 102px?

});

it('updates value when props.value changes', () => {
const { rerender } = render(<Textarea value="Initial value" />);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this variable name seems misleading if we're just rendering Textarea here, please feel free to correct me here.

@shashilo
Copy link
Collaborator

This screen should have the ability to All users, users in a specific league only, etc.

@shashilo this was discussed previously in how we want to handle it.

I can grab the drop-down we have on the homepage if you'd like. Or, my original thought was that it would be based on what league was chosen in the AdminMenu on the top of the admin layout.

I also have another task that was to create the league choice interface.

image

This drop down is just a quick switch dropdown. It should'n't be tied to page itself. Think of it as a nav.

@shashilo
Copy link
Collaborator

This is not the ideal functionality. We're going to merge this, but create another ticket to refactor the UX to be correct.

@shashilo shashilo merged commit a0a2c1c into alex/implement-email-notification-functionality Oct 14, 2024
5 checks passed
@shashilo shashilo deleted the alex/ryan/ux-admin-notification-page branch October 14, 2024 16:38
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