refactor(stage-ui): <Alert> <ErrorContainer>#295
Conversation
✅ Deploy Preview for airi-vtuber ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Summary of Changes
Hello @typed-sigterm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request focuses on improving the consistency and maintainability of the user interface by introducing dedicated, reusable components for displaying alerts and errors. I've replaced various ad-hoc implementations of these messages with the new components across multiple application modules, standardizing their appearance and behavior.
Highlights
- New UI Components: I've introduced two new reusable Vue components,
<Alert.vue>and<ErrorContainer.vue>, within thepackages/stage-ui/src/components/Misc/directory. These components provide a standardized and consistent way to display informational messages, warnings, and errors across the application. - UI Code Refactoring: I've refactored existing UI code across various settings pages in both
apps/stage-tamagotchiandapps/stage-webapplications. This involved replacing numerous instances of customdivelements, previously used for displaying alerts and errors, with the newly created<Alert>and<ErrorContainer>components. This significantly reduces code duplication and improves maintainability. - Improved Consistency: By centralizing the implementation of alert and error messages, this PR ensures a consistent look and feel for these UI elements throughout the application, enhancing the overall user experience.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
✅ Deploy Preview for airi-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Code Review
This pull request refactors the UI to use <Alert> and <ErrorContainer> components, improving code maintainability. Key issues addressed include missing props in <ErrorContainer>, a missing CSS class in Alert, and a typo in the i18n file.
| <Alert v-if="searchQuery && sortedFilteredCards.length === 0" type="warning"> | ||
| <template #title> | ||
| {{ t('settings.pages.card.no_results') }} | ||
| </template> |
There was a problem hiding this comment.
The original div that was replaced had a col-span-full class, which is important for the grid layout. This class was omitted when refactoring to the <Alert> component. Add the class back to the <Alert> component.
<Alert v-if="searchQuery && sortedFilteredCards.length === 0" type="warning" class="col-span-full">
<template #title>
{{ t('settings.pages.card.no_results') }}
</template>
<template #content>
{{ t('settings.pages.card.try_different_search') }}
</template>
</Alert>
[skip ci] [skip netlify] Co-authored-by: Neko <neko@ayaka.moe>
[skip ci] [skip netlify]
--------- Co-authored-by: Neko <neko@ayaka.moe>

Description
Linked Issues
resolve #294
Additional context