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

Add public get tags method #1893

Merged
merged 12 commits into from
Nov 16, 2023
Merged

Conversation

jinliu9508
Copy link
Contributor

@jinliu9508 jinliu9508 commented Nov 2, 2023

Description

One Line Summary

Add a public getTags method

Details

Motivation

Provide a public getTags upon request

Scope

We are only returning the local tags

Testing

Unit testing

Add one unit test to ensure the data is the same

Manual testing

I ran it in an emulator, added a tag, and the call of getTags returns that tag

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
    • If it is hard to explain how any codes changes are related to each other then it most likely needs to be more than one PR
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
    • Simplify with less code, followed by splitting up code into well named functions and variables, followed by adding comments to the code.
  • I have reviewed this PR myself, ensuring it meets each checklist item
    • WIP (Work In Progress) is ok, but explain what is still in progress and what you would like feedback on. Start the PR title with "WIP" to indicate this.

This change is Reviewable

Copy link
Contributor

@emawby emawby left a comment

Choose a reason for hiding this comment

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

This looks great! I believe the code is correct, but for future proofing lets add a test where the user changes (causing the tags to change) and verify that when we switch users we get the updated tags.

@jinliu9508
Copy link
Contributor Author

@emawby Good point! A new test case for tags modification is added in this PR. Please have a look!

@jinliu9508 jinliu9508 requested a review from emawby November 7, 2023 18:17
Copy link
Contributor

@emawby emawby left a comment

Choose a reason for hiding this comment

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

It looks like the linter is failing. You may need to rebase since changes were merged that fix linting

Got rid of userManager.tags getter because it conflicts the name generated by the JVM which is also getTags
@jinliu9508 jinliu9508 force-pushed the add-public-getTags-method branch from 5250d84 to 4702341 Compare November 7, 2023 22:51
@emawby emawby self-requested a review November 7, 2023 23:40
@shepherd-l
Copy link
Contributor

I noticed that the linter check is still failing, could you fix the linter indentation errors in UserManagerTests?

Also just a nit but, I think the Migration Guide could be updated to include getTags in the API Reference section

@jinliu9508
Copy link
Contributor Author

I noticed that the linter check is still failing, could you fix the linter indentation errors in UserManagerTests?

Also just a nit but, I think the Migration Guide could be updated to include getTags in the API Reference section

@shepherd-l Thanks, Shepherd! I have fixed the linter error and added 'getTags' in the Migration Guide. Please have a look.

Copy link
Contributor

@shepherd-l shepherd-l 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 to me!

Reviewed 1 of 3 files at r2.
Reviewable status: 1 of 4 files reviewed, all discussions resolved (waiting on @jennantilla, @jkasten2, and @nan-li)

@jinliu9508 jinliu9508 merged commit 41b418e into user-model/main Nov 16, 2023
2 checks passed
@jinliu9508 jinliu9508 deleted the add-public-getTags-method branch November 16, 2023 19:01
@jennantilla jennantilla mentioned this pull request Dec 1, 2023
jinliu9508 added a commit that referenced this pull request Jan 31, 2024
jinliu9508 added a commit that referenced this pull request Jan 31, 2024
jinliu9508 added a commit that referenced this pull request Feb 6, 2024
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