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

feat: search bar in fav activity modal #1799

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

xiaopeng0202
Copy link
Collaborator

@xiaopeng0202 xiaopeng0202 commented Jan 3, 2025

Description

Closes #1641

Changelog

New

  • add search bar in favourite activity modal

How was this tested?

  • 🧠 Not needed
  • 👀 Eyeball
  • 🤖 Added tests

What gif/image best describes this PR or how it makes you feel?


Thanks for the PR!

Deployments, as required, will be available below:

Please create PRs in draft mode. Mark as ready to enable:

After merge, new images are deployed in:

@xiaopeng0202 xiaopeng0202 marked this pull request as draft January 3, 2025 18:25
Base automatically changed from feat/1637-add-favourite-modal to main January 21, 2025 18:36
@xiaopeng0202 xiaopeng0202 marked this pull request as ready for review January 21, 2025 19:12
@kevinginley
Copy link
Collaborator

Sorry @xiaopeng0202 , for some reason I'm not seeing where I can access the fav activity modal?

image
Am I missing something or looking at the wrong screen?

And I have a feeling this would be tricky to fix, but the favourite activity tooltip is cut off by the navigation panel:
Screenshot (416)

@xiaopeng0202
Copy link
Collaborator Author

Sorry @xiaopeng0202 , for some reason I'm not seeing where I can access the fav activity modal?

image Am I missing something or looking at the wrong screen?

And I have a feeling this would be tricky to fix, but the favourite activity tooltip is cut off by the navigation panel: Screenshot (416)

oh, sorry, it's invisible from the nav bar, just try this link

https://nr-spar-49-frontend.apps.silver.devops.gov.bc.ca/consep/favourite-activities

@kevinginley
Copy link
Collaborator

@xiaopeng0202 Thanks! I can access it now.

For the heading:
You don't have any favorites to show yet!

please change to:
You don't have any favourites to show yet!

(adding a "u" to "favorite")

Similarly, please update the text below to read:

You can favourite your activities by clicking on "Add favourite activity" or by clicking on the heart icon on each page.


For the "My favourite activities" page - currently, only one favourite can be highlighted at any given time. Is that the intended behavior?


The add favourite activity modal looks great and search bar is working for me.

@xiaopeng0202
Copy link
Collaborator Author

@xiaopeng0202 Thanks! I can access it now.

For the heading: You don't have any favorites to show yet!

please change to: You don't have any favourites to show yet!

(adding a "u" to "favorite")

Similarly, please update the text below to read:

You can favourite your activities by clicking on "Add favourite activity" or by clicking on the heart icon on each page.

For the "My favourite activities" page - currently, only one favourite can be highlighted at any given time. Is that the intended behavior?

The add favourite activity modal looks great and search bar is working for me.

Updated. Oh for the highlighted part, we'd like to support multiple highlight? Could that be as many as 12?

@kevinginley
Copy link
Collaborator

Updated. Oh for the highlighted part, we'd like to support multiple highlight? Could that be as many as 12?

Yes, that sounds good to me - being able to highlight multiple favourite activities with a maximum of 12

@xiaopeng0202
Copy link
Collaborator Author

Updated. Oh for the highlighted part, we'd like to support multiple highlight? Could that be as many as 12?

Yes, that sounds good to me - being able to highlight multiple favourite activities with a maximum of 12

sounds good, i will have a follow up PR

Copy link
Collaborator

@mgaseta mgaseta left a comment

Choose a reason for hiding this comment

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

Nice job!
Added a few comments and suggestions.

Comment on lines +127 to +156
<Column sm={1} md={3} lg={4} xlg={4}>
<Dropdown
id="client-search-dropdown"
label=""
aria-label="Client Search Field Select Dropdown"
titleText=""
items={searchOptions}
selectedItem={searchOption}
onChange={(e: ComboBoxEvent) => {
setSearchOption(e.selectedItem);
}}
/>
</Column>
<Column sm={2} md={3} lg={10} xlg={10}>
<TextInput
id="client-search-input"
labelText=""
aria-label="Favourite Activity Search Input"
placeholder="Search for favourite activity"
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setSearchWord(e.target.value);
}}
/>
</Column>
<Column sm={1} md={2} lg={2} xlg={2}>
<Button size="md" className="fav-activity-search-btn">
Search
<Icons.Search className="fav-activity-search-btn-icon" />
</Button>
</Column>
Copy link
Collaborator

Choose a reason for hiding this comment

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

These columns needs to be inside a <Row> component.

frontend/src/views/CONSEP/FavouriteActivity/constants.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not necessary, just a suggestion, but maybe we can add the suffix Type to the new types we create, so that we can look at it in the code and be sure that it's a type.

frontend/src/views/CONSEP/FavouriteActivity/styles.scss Outdated Show resolved Hide resolved
frontend/src/views/CONSEP/FavouriteActivity/styles.scss Outdated Show resolved Hide resolved
frontend/src/views/CONSEP/FavouriteActivity/styles.scss Outdated Show resolved Hide resolved
frontend/src/views/CONSEP/FavouriteActivity/styles.scss Outdated Show resolved Hide resolved
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.

search functionality for "add favourites modal"
3 participants