Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

fix: resolving internal links into share spaces and shared files - #9821

Merged
JammingBen merged 5 commits into
masterfrom
fix-internal-share-space-resolving
Oct 31, 2023
Merged

JammingBen merged 5 commits into
masterfrom
fix-internal-share-space-resolving

Conversation

@JammingBen

@JammingBen JammingBen commented Oct 17, 2023 •

Copy link
Copy Markdown
Contributor

Description

Aligns the resolving of public and internal links. When openLinksWithDefaultApp is enabled, links will now always resolve into the default app. Before, this was only working for some links and only under specific circumstances.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen self-assigned this Oct 17, 2023
@update-docs

update-docs Bot commented Oct 17, 2023

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@JammingBen
JammingBen force-pushed the fix-internal-share-space-resolving branch 2 times, most recently from c7563e7 to 611cc85 Compare October 17, 2023 14:44
@JammingBen
JammingBen marked this pull request as ready for review October 18, 2023 06:15
@JammingBen
JammingBen force-pushed the fix-internal-share-space-resolving branch 2 times, most recently from 18197bd to 8c6da63 Compare October 30, 2023 09:12
import SharesNavigation from 'web-app-files/src/components/AppBar/SharesNavigation.vue'
import { useGettext } from 'vue3-gettext'
import { useStore } from '@ownclouders/web-pkg'
import { useOpenWithDefaultApp } from '../../composables/openWithDefaultApp'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There also is a index.ts file which is supposed to export all folders in the composables directory. With that it would be possible to import all composables at the same time from the composables folder. Looks like there are more folders missing in the index.ts file - could be cleaned up in a followup, but for the new composable openWithDefaultApp it would be nice if you could use that pattern already. :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point, fixed here for the useOpenWithDefaultApp composable. We need to be careful with the imports still, sometimes unit tests require these specific imports to be able to mock stuff and to avoid circular imports.

space: space
}

const defaultEditorAction = getDefaultEditorAction(fileActionsOptions)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

always nice to see how composables can actually be used in other composables... that turned out nice 💪

@dschmidt dschmidt Oct 31, 2023 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

apparently "composables" weren't named that way by accident ;-)

| lorem.txt |
When "Brian" opens the public link "textLink"
Then for "Brian" file "shareToBrian.txt" should be selected
And "Brian" closes the file viewer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hm, I get that this is somehow an implicit verification step of being in a file viewer... but reads super weird. What do you think about introducing a generic step for Then "Brian" is in a file viewer or the like? @ScharfViktor any hints here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You are right, the open public link step does not contain any checking, and close file viewer just clicks the close button.
need implement step that we can ensure that text editor was opened. A step should be implemented to ensure that the text editor has been opened.

added to my TODO list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not necessarily the text editor. I think for a first step it's already sufficient to have a check for any editor / viewer. That's already fulfilled if the close button in the top bar is present. So with the implementation that @JammingBen chose the tests are doing what they should... but they are hard to understand from just reading the Gherkin.

@JammingBen
JammingBen requested a review from kulmann October 31, 2023 06:19
@JammingBen
JammingBen force-pushed the fix-internal-share-space-resolving branch from 09ceeb2 to 723f54d Compare October 31, 2023 09:26
@sonarqubecloud

Copy link
Copy Markdown

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 4 Code Smells

84.4% 84.4% Coverage
0.0% 0.0% Duplication

@JammingBen
JammingBen merged commit 91ef1c1 into master Oct 31, 2023
@delete-merged-branch
delete-merged-branch Bot deleted the fix-internal-share-space-resolving branch October 31, 2023 12:28
@v-scharf v-scharf mentioned this pull request Nov 17, 2023
5 tasks done
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Private link does not open in default app No redirect to shares with me page while opening internal link in case auto_accept_share

4 participants