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

refactor: evgeniy/92724/language settings improvements #8176

Conversation

yauheni-deriv
Copy link
Contributor

Changes:

Please include a summary of the change and which issue is fixed below:

  • ...

When you need to add unit test

  • If this change disrupt current flow
  • If this change is adding new flow

When you need to add integration test

  • If components from external libraries are being used to define the flow, e.g. @deriv/components
  • If it relies on a very specific set of props with no default behavior for the current component.

Test coverage checklist (for reviewer)

  • Ensure utility / function has a test case
  • Ensure all the tests are passing

Type of change

  • Bug fix
  • New feature
  • Update feature
  • Refactor code
  • Translation to code
  • Translation to crowdin
  • Script configuration
  • Improve performance
  • Style only
  • Dependency update
  • Documentation update
  • Release

@vercel
Copy link

vercel bot commented Apr 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
deriv-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 7:34am

@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2023

🚨 Lighthouse report for the changes in this PR:

Category Score
🔺 Performance 21
🟧 Accessibility 75
🟢 Best practices 92
🟧 SEO 85
🟢 PWA 90

Lighthouse ran with https://deriv-app-git-fork-yauheni-deriv-evgeniy-92724languagese-2ebeca.binary.sx/

niloofar-deriv
niloofar-deriv previously approved these changes Apr 6, 2023
Copy link
Contributor

@niloofar-deriv niloofar-deriv left a comment

Choose a reason for hiding this comment

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

LGTM 👍

amina-deriv
amina-deriv previously approved these changes Apr 6, 2023
henry-deriv
henry-deriv previously approved these changes Apr 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2023

A production App ID was automatically generated for this PR. (log)

Click here to copy & paste above information.
- **PR**: [https://github.com/binary-com/deriv-app/pull/8176](https://github.com/binary-com/deriv-app/pull/8176)
- **URLs**:
    - **w/ App ID + Server**: https://deriv-app-git-fork-yauheni-deriv-evgeniy-92724languagese-2ebeca.binary.sx?qa_server=red.binaryws.com&app_id=32215
    - **Original**: https://deriv-app-git-fork-yauheni-deriv-evgeniy-92724languagese-2ebeca.binary.sx
- **App ID**: `32215`

@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2023

Codecov Report

Merging #8176 (af89cf9) into master (d5c38a0) will not change coverage.
Report is 571 commits behind head on master.
The diff coverage is n/a.

❗ Current head af89cf9 differs from pull request most recent head 127a787. Consider uploading reports for the commit 127a787 to get more accurate results

@@          Coverage Diff           @@
##           master   #8176   +/-   ##
======================================
  Coverage    0.05%   0.05%           
======================================
  Files         117     117           
  Lines        3425    3425           
  Branches      893     893           
======================================
  Hits            2       2           
  Misses       3423    3423           

@yauheni-deriv yauheni-deriv force-pushed the evgeniy/92724/language_settings_improvements branch from b19746b to 4ae4d10 Compare April 13, 2023 11:10
niloofar-deriv
niloofar-deriv previously approved these changes Apr 13, 2023
henry-deriv
henry-deriv previously approved these changes Apr 13, 2023
Comment on lines 1 to 6
/**
* Checks is the url passed as prop routes to external URL resource by checking if it starts with http, https or mailto
* @param link string
* @returns boolean
*/
export const isExternalLink = (link: string) => /^(http|https|mailto):/i.test(link);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand the use of isExternalLink, or the variable name needs to be improved.

can we just use isNavigationFromExternalPlatform instead.

seems like there is a typo in the comment section as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the goal and functionality of these functions are different.
with isExternalLink we are checking additionally if the route is to external link and not to the some of the app's page. Basically it i used to resolve our current production issue, when you try to navigate through account settings for responsive version, you see reloading the app. It is due to wrong usage of and .
so this issue has been fixed in this PR.
will fix the typo 👍

matin-deriv
matin-deriv previously approved these changes Oct 2, 2023
@sonarcloud
Copy link

sonarcloud bot commented Oct 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
1.1% 1.1% Duplication

@sandeep-deriv sandeep-deriv merged commit 2c82757 into binary-com:master Oct 4, 2023
6 of 7 checks passed
vinu-deriv pushed a commit that referenced this pull request Oct 10, 2023
* refactor: evgeniy/92724/language settings improvements

* fix: cursor button fix

* feat: same language menu usage for responsive

* fix: hide language icon while opening language menu

* refactor: review change, adding types and dependencies

* fix: changes from master missed

* fix: reading undefined error

* fix: duplicated properties

* fix: types duplicate

* chore: language-settings test

* refactor: menu-link store separately

* chore: menu-link test coverage

* refactor: test code structure

* refactor: link code

* refactor: remove unused code

* refactor: code readability

* refactor: variable usage

* refactor: variable usage

* refactor: review comments incorporating

* fix: test refactor with mockstore

* fix: missing mock

* fix: 🎨 incorporated deriv/util package

* fix: ⚡ refactored code

* feat: resolved code smells

* feat: resolved review comments

* feat: resolved review comments

* feat: resolved review comments

* fix: failing testcase

* fix: 🐛 missing import

* Trigger build

* chore: trigger build

* Merge branch 'master' into evgeniy/92724/language_settings_improvements

* chore: review comments incorporate

* refactor: types store alphabetically order

* refactor: types store alphabetically order

* refactor: menulink export fix

* chore: remove unused variable

* refactor: remove unused variable

* chore: trigger build

* fix: resolve conflicts

* fix: repeated fields

* chore: isExternalLink description

* chore: bootstrap

---------

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Likhith Kolayari <likhith@regentmarkets.com>
vinu-deriv pushed a commit that referenced this pull request Oct 10, 2023
* refactor: evgeniy/92724/language settings improvements

* fix: cursor button fix

* feat: same language menu usage for responsive

* fix: hide language icon while opening language menu

* refactor: review change, adding types and dependencies

* fix: changes from master missed

* fix: reading undefined error

* fix: duplicated properties

* fix: types duplicate

* chore: language-settings test

* refactor: menu-link store separately

* chore: menu-link test coverage

* refactor: test code structure

* refactor: link code

* refactor: remove unused code

* refactor: code readability

* refactor: variable usage

* refactor: variable usage

* refactor: review comments incorporating

* fix: test refactor with mockstore

* fix: missing mock

* fix: 🎨 incorporated deriv/util package

* fix: ⚡ refactored code

* feat: resolved code smells

* feat: resolved review comments

* feat: resolved review comments

* feat: resolved review comments

* fix: failing testcase

* fix: 🐛 missing import

* Trigger build

* chore: trigger build

* Merge branch 'master' into evgeniy/92724/language_settings_improvements

* chore: review comments incorporate

* refactor: types store alphabetically order

* refactor: types store alphabetically order

* refactor: menulink export fix

* chore: remove unused variable

* refactor: remove unused variable

* chore: trigger build

* fix: resolve conflicts

* fix: repeated fields

* chore: isExternalLink description

* chore: bootstrap

---------

Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
Co-authored-by: Likhith Kolayari <98398322+likhith-deriv@users.noreply.github.com>
Co-authored-by: Matin shafiei <matin@deriv.com>
Co-authored-by: Likhith Kolayari <likhith@regentmarkets.com>
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.