Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

For #22770 - Use String.toShortUrl from A-C #28071

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

Alexandru2909
Copy link
Contributor

@Alexandru2909 Alexandru2909 commented Dec 5, 2022

After uplifting Strings.toShortUrl to A-C in mozilla-mobile/android-components#12368, we should use the A-C code in Fenix.

Pull Request checklist

  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
  • Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features. In addition, it includes a screenshot of a successful accessibility scan to ensure no new defects are added to the product.

QA

  • QA Needed

To download an APK when reviewing a PR (after all CI tasks finished running):

  1. Click on Checks at the top of the PR page.
  2. Click on the firefoxci-taskcluster group on the left to expand all tasks.
  3. Click on the build-debug task.
  4. Click on View task in Taskcluster in the new DETAILS section.
  5. The APK links should be on the right side of the screen, named for each CPU architecture.

GitHub Automation

Fixes #22770

Copy link
Contributor

@t-p-white t-p-white left a comment

Choose a reason for hiding this comment

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

Code changes lgtm 👍

The removal of the test cases have highlighted that the remaining toShortUrl fun has no tests. Is this something that a) is required? and b) should be done as a separate issue?

@gabrielluong
Copy link
Member

Code changes lgtm 👍

The removal of the test cases have highlighted that the remaining toShortUrl fun has no tests. Is this something that a) is required? and b) should be done as a separate issue?

Thanks for being on ball about having tests. These string functions and their tests were actually uplifted to AC into the support-ktx component which contains a bunch of kotlin extension functions that can be easily reused. I did double check based on your concern and am happy to report that everything was uplifted in mozilla-mobile/firefox-android#76. So, there's no loss of the test here. Also, changes look good to me.

@gabrielluong gabrielluong added the pr:approved PR that has been approved label Dec 5, 2022
@t-p-white
Copy link
Contributor

@gabrielluong 👍 just to clarify my comment, I was referring to the remaining Composable function String.toShortUrl() that wasn’t uplifted.

@Alexandru2909 Alexandru2909 added the pr:needs-landing PRs that are ready to land [Will be merged by Mergify] label Dec 6, 2022
@mergify mergify bot merged commit 3135062 into mozilla-mobile:main Dec 6, 2022
@gabrielluong
Copy link
Member

Code changes lgtm 👍

The removal of the test cases have highlighted that the remaining toShortUrl fun has no tests. Is this something that a) is required? and b) should be done as a separate issue?

Ah gotcha, I was leaning towards the test for the composable String.toShortUrl() being optional since it is a helper function either calling the upstream toShortUrl implementation or otherwise calling the built in String.take. However, I am thinking now it might be a good exercise to learn how we can test composable functions. So, I will file a followup.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:approved PR that has been approved pr:needs-landing PRs that are ready to land [Will be merged by Mergify]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uplift String.toShortUrl to ac support-ktx/utils
3 participants