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

Created Dialog for Adding Tags #74

Merged
merged 7 commits into from
Nov 21, 2023
Merged

Created Dialog for Adding Tags #74

merged 7 commits into from
Nov 21, 2023

Conversation

MatthewNeufeld
Copy link
Contributor

@MatthewNeufeld MatthewNeufeld commented Nov 19, 2023

Describe your changes

This PR accomplishes the following:

  • Created dialog for adding tags
  • Gave functionality to tag button in SelectFragment

Note for reviewers:

Selecting and applying tags to items will be addressed in [US 03.03.01] Select and apply tags to items. This ticket is for defining the tags and creating the dialog.

Issue ticket number and link

This PR addresses: [US 03.01.01] Create tags to categorize items

Checklist before requesting a review

  • I have performed a self-review of my code
  • Necessary java docs are present
  • Necessary UML diagrams are created
  • Necessary tests are written

Screenshots (if applicable)

Screen Shot 2023-11-18 at 16 55 41
Screen Shot 2023-11-18 at 17 11 57

Copy link
Contributor

@ldbonkowski ldbonkowski left a comment

Choose a reason for hiding this comment

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

Looks good, Just wondering if we can consolidate chip setup so we can get all the styling to look the same and reduce duplicated code

// Check if the tag is not empty
if (!tagText.isEmpty()) {
// Create a new Chip and set its properties
Chip chip = new Chip(requireContext());
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if its viable/feasible but could we consolidate the keyword chip and tag chip into some util method like setupChip(chipText, chipGroup); ? Look at autoFillFilter() in KeywordFilterFragment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ldbonkowski See latest commit, I applied the util to TagFragment and KeywordFilterFragment

Copy link
Contributor

@ldbonkowski ldbonkowski Nov 19, 2023

Choose a reason for hiding this comment

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

Do we not want to duplicate the colour lines too?

chip.setChipBackgroundColorResource(R.color.white);
chip.setChipStrokeColorResource(R.color.brown);
chip.setTextColor(ContextCompat.getColor(context , R.color.brown));

Also I was thinking we could call it newChip and put line 68 inside as well and just pass the context in.

Copy link
Contributor Author

@MatthewNeufeld MatthewNeufeld Nov 19, 2023

Choose a reason for hiding this comment

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

@ldbonkowski Addressed these in the most recent commit. I think it's as consolidated as we can get for now but lmk what you think. I do see areas that we could potentially consolidate in the future once we have selecting and applying tag functionality so we can put a pin in it until we have that feature.

Copy link
Contributor

@ldbonkowski ldbonkowski left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@owencooke owencooke left a comment

Choose a reason for hiding this comment

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

I like my chips with the dip 🥔

@MatthewNeufeld MatthewNeufeld merged commit 4981f1f into main Nov 21, 2023
2 checks passed
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.

3 participants