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

User Customize Labels #946

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

Conversation

jiji14
Copy link
Contributor

@jiji14 jiji14 commented Dec 1, 2023

Related Issue

What I added

  1. getUserCustomLabels: Retrieve user's custom labels with keys(mode, purpose, replaced_mode) from the database and return a string array sorted by frequency.
  2. insertUserCustomLabel: Insert the user's custom label with a key in the database and then return the updated label.
  3. updateUserCustomLabel: Update the user's custom label with a key, including frequency, in the database and then return the updated label.
  4. deleteUserCustomLabel: Change the user's custom label with a key as !isActive in the database and then return the updated modes.

Unit Tests

  1. getUserCustomLabels
  2. InsertUserCustomLabel
  3. UpdateUserCustomLabel
  4. DeleteUserCustomLabel

Result

[ Database ]

Screenshot 2023-12-13 at 2 01 24 PM

[ UI ]

ui1 ui2 ui3

@jiji14 jiji14 marked this pull request as draft December 1, 2023 21:10
Increase new mode frequency(+1) and decrease old frequency(-1)
Reason: Javascript doesn't have sorted map data structure. We need to send the response value in sorted list.
@jiji14 jiji14 changed the title Customize Mode Feature - Step 1 Customize Mode Functions Dec 19, 2023
@jiji14 jiji14 marked this pull request as ready for review December 20, 2023 01:14
@jiji14 jiji14 changed the title Customize Mode Functions User Customize Mode Functions Dec 20, 2023
@jiji14 jiji14 changed the title User Customize Mode Functions User Customize Labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for review
1 participant