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

[full-ci] Remove contextRouteName from app params and add it to the query instead #6622

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

dschmidt
Copy link
Member

Description

This removes contextRouteName from app parameters. It's handled fully automatically in the url query, so apps can just use the provided useAppDefaults composable and don't need to mess with urls themselves for something they really should not have to care about.

Nice sideeffect is that it's now visible further in the back of the url and hopefully less confusing for users.

Related Issue

  • Fixes <issue_link>

Motivation and Context

Make everything more streamlined and straightforward for developing file editors/viewers.
I've also taken care that changing the query item name is also just a two line patch, as we plan to adjust the naming in the near future.

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

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

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • ...

Copy link
Contributor

@pascalwengerter pascalwengerter left a comment

Choose a reason for hiding this comment

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

Fine for me if CI is happy, too

@sonarcloud
Copy link

sonarcloud bot commented Mar 18, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

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

14.3% 14.3% Coverage
0.0% 0.0% Duplication

@dschmidt dschmidt changed the title Remove contextRouteName from app params and add it to the query instead [full-ci] Remove contextRouteName from app params and add it to the query instead Mar 18, 2022
@dschmidt dschmidt merged commit 1bc88bb into master Mar 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the context_route branch March 18, 2022 17:54
const isPublicLinkContext = computed(() => {
return unref(currentRoute).params.contextRouteName === 'files-public-files'
return unref(currentRoute).query[contextRouteNameKey] === 'files-public-files'
Copy link
Member

Choose a reason for hiding this comment

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

Did you see the useRouteQuery composable? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

😅

const isPublicLinkContext = computed(() => {
return unref(currentRoute).params.contextRouteName === 'files-public-files'
return unref(currentRoute).query[contextRouteNameKey] === 'files-public-files'
Copy link
Member

Choose a reason for hiding this comment

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

Did you see the useRouteQuery composable? 🤔

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

Successfully merging this pull request may close these issues.

3 participants