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

Show on App Launch: Translations #4980

Conversation

mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Sep 3, 2024

Task/Issue URL: https://app.asana.com/0/1207908166761516/1208156273709092/f

Description

Translations for Show on App Launch

Steps to test this PR

N/A

UI changes

No UI changes

@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from dc43c2e to 3ac59e0 Compare September 3, 2024 16:19
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from 3ac59e0 to 895f987 Compare September 3, 2024 16:57
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from 895f987 to f817cbc Compare September 9, 2024 09:19
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/translations_l10n branch from 9e17bc5 to 2255144 Compare September 9, 2024 09:19
@anikiki anikiki self-assigned this Sep 10, 2024
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from f817cbc to 77c276d Compare September 11, 2024 07:47
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/translations_l10n branch from 2255144 to 4b18eac Compare September 11, 2024 07:47
Copy link
Contributor

@anikiki anikiki left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from 4525020 to 9b57b79 Compare September 12, 2024 08:16
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/translations_l10n branch 2 times, most recently from 6a40fe1 to 9b0bfe9 Compare September 12, 2024 09:11
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from 16e96ff to 2bab6af Compare September 12, 2024 09:47
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/translations_l10n branch 2 times, most recently from cbfa50f to bd1e9f5 Compare September 12, 2024 13:14
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from 0958ef2 to 4c2ffe1 Compare September 16, 2024 13:36
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/translations_l10n branch from bd1e9f5 to 4dba6e6 Compare September 16, 2024 13:36
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from 4c2ffe1 to e6fc998 Compare September 19, 2024 14:31
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/translations_l10n branch from 4dba6e6 to f22a708 Compare September 19, 2024 14:31
@mikescamell mikescamell mentioned this pull request Sep 19, 2024
12 tasks
marcosholgado and others added 19 commits September 19, 2024 16:42
Translate strings to values-fr
Translate strings to values-cs
Translate strings to values-sv
Translate strings to values-sk
Translate strings to values-el
Translate strings to values-it
Translate strings to values-es
Translate strings to values-ro
Translate strings to values-tr
Translate strings to values-sk
Translate strings to values-ru
Translate strings to values-et
Translate strings to values-it
Translate strings to values-pl
Translate strings to values-bg
Translate strings to values-lv
Translate strings to values-fi
Translate strings to values-sl
Translate strings to values-nl
Translate strings to values-hr
Translate strings to values-hu
Translate strings to values-nb
Translate strings to values-sv
Translate strings to values-da
Translate strings to values-el
Translate strings to values-fr
Translate strings to values-lt
Translate strings to values-pt
Translate strings to values-cs
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/add-persistence branch from e6fc998 to c3e9c87 Compare September 19, 2024 14:48
@mikescamell mikescamell force-pushed the feature/mike/show-on-app-launch/translations_l10n branch from f22a708 to b40783d Compare September 19, 2024 14:48
daxmobile and others added 2 commits September 19, 2024 11:01
Translate strings to values-es
Translate strings to values-ro
Translate strings to values-tr
Translate strings to values-sk
Translate strings to values-ru
Translate strings to values-et
Translate strings to values-it
Translate strings to values-pl
Translate strings to values-bg
Translate strings to values-lv
Translate strings to values-fi
Translate strings to values-sl
Translate strings to values-nl
Translate strings to values-hr
Translate strings to values-hu
Translate strings to values-nb
Translate strings to values-sv
Translate strings to values-da
Translate strings to values-el
Translate strings to values-fr
Translate strings to values-lt
Translate strings to values-pt
Translate strings to values-cs
Task/Issue URL:
https://app.asana.com/0/1207908166761516/1208167186867417/f

### Description

Adds functionality to open the show on app launch option based on what
has been set.

If there is no specialised launch happening then we check the show on
app launch setting:

1. If LastOpenedTab is set, we do nothing as this is current behaviour
2. If NewTabPage is set then we open a new tab
3. If SpecificPage is set we compare the url to the current selected
tab, if it's not the same we open a new tab otherwise we do nothing

Also as part of this PR, we add validation to the URL:

1. It is blank will set it as a default to duckduckgo.com
2. If it has no scheme will add http (in case the website does not
currently support https)
3. Otherwise return the url what was passed in

### Steps to test this PR

_Last Opened Tab_
- [x] Set "Show on App Launch" to **Last Opened Tab** 
- [x] Exit Settings
- [x] Remember your current tab and tab count
- [x] Force close the app via recents
- [x] Open the app
- [x] Check the tab is the same as when you closed
- [x] Ensure the tab count has not increased

_New Tab Page_
- [x] Set "Show on App Launch" to **New Tab Page**
- [x] Exit Settings
- [x] Remember your current tab and tab count. If this is the **New Tab
Page** then please open a website e.g. “bbc.com"
- [x] Force close the app via recents
- [x] Open the app
- [x] Check the tab is now the **New Tab Page**
- [x] Ensure the tab count **has** increased by one
- [x] Force close the app via recents
- [x] Open the app
- [x] Check the tab is still the **New Tab Page**
- [x] Ensure the tab count has **not** increased by one

_Specific Page_
- [x] Set "Show on App Launch" to **Specific Page**
- [x] Check the default URL is “https://duckduckgo.com/” 
- [x] Exit Settings
- [x] Remember your current tab (it should not be
“https://duckduckgo.com/”) and tab count
- [x] Force close the app via recents
- [x] Open the app
- [x] Check the tab is now **https://duckduckgo.com/**
- [x] Ensure the tab count **has** increased by one (if your tab was on
the new tab page before you force closed it would not increase)
- [x] Force close the app via recents
- [x] Open the app
- [x] Check the tab is still **https://duckduckgo.com/**
- [ ] Ensure the tab count has **not** increased by one

_Specific Page Lowercasing_
- [x] Set "Show on App Launch" to **Specific Page**
- [x] Change the default URL to “BBC.com”
- [x] Press back
- [x] Check that under the "Show on App Launch” setting the url is
“http://bbc.com”

_Specific Page Updated_
- [x] Set "Show on App Launch" to **Specific Page**
- [x] Change the default URL to a different url e.g. “cnn.com"
- [x] Exit Settings
- [x] Remember your current tab (it should **not** be the same url you
entered earlier) and tab count
- [x] Force close the app via recents
- [x] Open the app
- [x] Check the tab is now the url you set e.g. **cnn.com**
- [x] Ensure the tab count **has** increased by one

_Specific Page Not a URL_
- [x] Set "Show on App Launch" to **Specific Page**
- [x] Change the default URL to a url that is invalid e.g. “example"
- [x] Press back
- [x] Check that under the "Show on App Launch” setting the url is
“http://example”
- [x] Remember your current tab (it should **not** be the same url you
entered earlier) and tab count
- [x] Force close the app via recents
- [x] Open the app
- [x] Check the tab has attempted to load "http://example"
- [x] Ensure the tab count **has** increased by one

_Specific Page Different Scheme_
- [x] Set "Show on App Launch" to **Specific Page**
- [x] Change the default URL to a url with a different scheme e.g.
“ftp://file.com"
- [x] Press back
- [x] Check that under the "Show on App Launch” setting the url is still
“ftp://file.com”

### UI changes

N/A

### Demo


https://github.com/user-attachments/assets/6296bd2e-d083-46fd-a738-787e8bf2b6ee
@mikescamell mikescamell merged commit 2e3acfe into feature/mike/show-on-app-launch/add-persistence Sep 20, 2024
4 of 5 checks passed
@mikescamell mikescamell deleted the feature/mike/show-on-app-launch/translations_l10n branch September 20, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants