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

fix: improve content source detection in environment switcher #142

Merged
merged 6 commits into from
May 16, 2024

Conversation

dylandepass
Copy link
Member

@dylandepass dylandepass commented May 14, 2024

The environment switcher tells the user which content source we will switch to when hitting the edit button. This PR makes that detection more robust and also will hide the button when it's a BYOM project.

Also allow-listed more of the files required to render the json view.

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.93%. Comparing base (38fd6a2) to head (3d8d845).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #142   +/-   ##
=======================================
  Coverage   99.93%   99.93%           
=======================================
  Files          44       44           
  Lines        1517     1525    +8     
=======================================
+ Hits         1516     1524    +8     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dylandepass dylandepass requested a review from rofe May 14, 2024 02:17
src/extension/app/store/app.js Show resolved Hide resolved
src/extension/app/store/app.js Outdated Show resolved Hide resolved
@dylandepass dylandepass changed the title fix: display Editor when in json view fix: improve content source detection in environment switcher May 15, 2024
src/extension/app/store/app.js Outdated Show resolved Hide resolved
const mountpointUrl = new URL(mountpoint);
return mountpointUrl.host.includes('.google.com')
? 'Google Drive'
: mountpointUrl.host.includes('.sharepoint.com') || mountpointUrl.pathname.includes('/Shared%20Documents/sites/')
Copy link
Member Author

Choose a reason for hiding this comment

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

Think we still have the problem you mentioned here by using pathname.

@dylandepass dylandepass requested a review from rofe May 16, 2024 13:03
@dylandepass dylandepass merged commit 27e0a3b into main May 16, 2024
6 checks passed
@dylandepass dylandepass deleted the fix-json-view branch May 16, 2024 14:39
trieloff pushed a commit that referenced this pull request May 16, 2024
## [1.22.1](v1.22.0...v1.22.1) (2024-05-16)

### Bug Fixes

* improve content source detection in environment switcher ([#142](#142)) ([27e0a3b](27e0a3b))
@trieloff
Copy link

🎉 This PR is included in version 1.22.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants