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

Add space sorting options: size and mdate #8675

Merged
merged 3 commits into from
Mar 23, 2023
Merged

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Mar 22, 2023

Related Issue

Screenshots (if appropriate):

image

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 Mar 22, 2023
@JammingBen JammingBen force-pushed the add-space-sorting-options branch 2 times, most recently from 167738d to 41dd3a8 Compare March 22, 2023 11:14
Copy link
Member

@dschmidt dschmidt left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -51,13 +51,15 @@
v-oc-tooltip="showSpaceMemberLabel"
:aria-label="showSpaceMemberLabel"
appearance="raw"
@click="openSidebarSharePanel(resource)"
@click="openSidebarSharePanel(resource as SpaceResource)"
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice to figure out how to type slots :-D

Copy link
Contributor Author

@JammingBen JammingBen Mar 22, 2023

Choose a reason for hiding this comment

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

Apparently you can type the context variables directly, see 299192a. I would like to use SpaceActionOptions here, but the import gets removed by the linter... :(

Edit: nvm, I un-did that commit because that's not what we want.

Copy link
Member

Choose a reason for hiding this comment

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

Turns out IntelliJ is smart enough to deduce the type from the slot declaration, vue-tsc apparently isn't... anyhow this is the correct fix, as resource-tiles component just deals with resources and that's why we need to downcast here.

Would be great if Vue had support for generic components 👀

Copy link
Contributor

Choose a reason for hiding this comment

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

haha +1 for generic components 😅

@JammingBen JammingBen force-pushed the add-space-sorting-options branch from 299192a to 13f232c Compare March 22, 2023 14:12
@@ -2,6 +2,7 @@ import { ref, Ref, computed, unref, isRef } from 'vue'
import { MaybeRef, ReadOnlyRef } from 'web-pkg/src/utils'
import { useRouteName, useRouteQueryPersisted, QueryValue } from 'web-pkg/src/composables'
import { SortConstants } from './constants'
import { useRouter } from 'vue-router'
Copy link
Member

Choose a reason for hiding this comment

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

Are we sure this always works? I had problems with this composable in the past and no time to debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohh good catch! I also had problems, I'll change that.

Copy link
Contributor

Choose a reason for hiding this comment

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

out of curiosity, what kind of problems?

Copy link
Member

Choose a reason for hiding this comment

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

Not returning our router instance or even: no instance at all.

As I said I haven't debugged it, so I can't tell you what exactly is going on.

@@ -51,13 +51,15 @@
v-oc-tooltip="showSpaceMemberLabel"
:aria-label="showSpaceMemberLabel"
appearance="raw"
@click="openSidebarSharePanel(resource)"
@click="openSidebarSharePanel(resource as SpaceResource)"
Copy link
Member

Choose a reason for hiding this comment

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

Turns out IntelliJ is smart enough to deduce the type from the slot declaration, vue-tsc apparently isn't... anyhow this is the correct fix, as resource-tiles component just deals with resources and that's why we need to downcast here.

Would be great if Vue had support for generic components 👀

@JammingBen JammingBen force-pushed the add-space-sorting-options branch from 13f232c to 461e2de Compare March 23, 2023 06:30
@sonarqubecloud
Copy link

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

42.9% 42.9% Coverage
0.0% 0.0% Duplication

@JammingBen JammingBen merged commit 7661fd9 into master Mar 23, 2023
@delete-merged-branch delete-merged-branch bot deleted the add-space-sorting-options branch March 23, 2023 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants