-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add search notifier field #312
Conversation
Add a search field, button that calls the notification loading method along with a clear button, with proper validation Update notification component ts code to add logic for adding filter for contains on data field if notifier search value exists Add the required styles for displaying the text field and button correctly
WalkthroughThe changes introduced a search functionality in the notifications component, enabling users to filter notifications by email. This includes a new input field for email addresses, validation for the input, and buttons for searching and clearing the input. Additionally, modifications were made to the associated styles for improved layout consistency, and the component's logic was updated to filter notifications based on the search input. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant NotificationsComponent
User->>NotificationsComponent: Enter email in search input
NotificationsComponent-->>User: Validate email input
User->>NotificationsComponent: Click Search Button
NotificationsComponent-->>User: Filter notifications based on email
User->>NotificationsComponent: Click Clear Button
NotificationsComponent-->>User: Clear search input
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
apps/portal/src/app/views/notifications/notifications.component.ts (1)
62-62
: Consider specifying a type forsearchValue
.Currently,
searchValue
is of typeany
. Consider specifying a more precise type, such asstring
, to improve type safety.- searchValue = null; + searchValue: string = null;
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- apps/portal/src/app/views/notifications/notifications.component.html (2 hunks)
- apps/portal/src/app/views/notifications/notifications.component.scss (1 hunks)
- apps/portal/src/app/views/notifications/notifications.component.ts (3 hunks)
Files skipped from review due to trivial changes (1)
- apps/portal/src/app/views/notifications/notifications.component.scss
Additional comments not posted (4)
apps/portal/src/app/views/notifications/notifications.component.ts (2)
142-144
: LGTM! TheonSearchClear
method is well-implemented.The method effectively resets the
searchValue
tonull
, allowing users to clear their search input.
215-221
: LGTM! The filtering logic inloadNotificationsLazy
is correctly implemented.The logic for filtering notifications based on
searchValue
is well-integrated and aligns with the PR objectives.apps/portal/src/app/views/notifications/notifications.component.html (2)
60-68
: LGTM! The search input field is well-implemented with validation.The input field is correctly bound to the
searchValue
model and includes a validation pattern for email format.
69-81
: LGTM! The search and clear buttons are well-implemented.The buttons are correctly enabled/disabled based on the input validity and value, ensuring proper user interaction.
Portal PR Checklist
Pre-requisites
PR Details
PR details have been updated as per the given format (see below)
feat: add admin login page
)Additional Information
ready for review
should be added if the PR is ready to be reviewed)Note: Reviewer should ensure that the checklist and description have been populated and followed correctly, and the PR should be merged only after resolving all conversations and verifying that CI checks pass.
Description:
Add brief description about the changes made in this PR and their purpose. This section can also include mention to any other PRs or issues if needed.
Related changes:
Screenshots:
Pending actions:
N/A
Additional notes:
N/A
Summary by CodeRabbit