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(Views): allow to sort for meta columns #1525

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

blizzz
Copy link
Member

@blizzz blizzz commented Jan 6, 2025

  • meta columns included in sorting do not need to be hidden from the response
  • changed the return value to an empty array, to avoid a Vue error in the frontend (it expects an array)

Now however, for owners the sorting is working ,but for share recipients it is not (but the content is at least visible).

Not sure this is the best approach, and the sorting needs frontend changes as well. Hoping for your feedback @enjeck

addresses #1524

@blizzz blizzz added bug Something isn't working 3. to review Waiting for reviews labels Jan 6, 2025
@blizzz blizzz requested a review from enjeck as a code owner January 6, 2025 14:46
$columnsArray = $view->getColumnsArray();
if (isset($sortRule['columnId']) && $columnsArray && in_array($sortRule['columnId'], $columnsArray, true)) {
if (isset($sortRule['columnId'])
&& $sortRule['columnId'] >= 0 // meta columns can be exposed
Copy link
Member Author

Choose a reason for hiding this comment

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

I would adapt to negated isValidMetaTypeId() check from #1526 once that's in.

- also fixes a return value that otherwise may render shared views
  ontentless

Signed-off-by: Arthur Schiwon <[email protected]>
@blizzz blizzz force-pushed the fix/1524/sort-views-hide-not-null branch from 01cfe8d to faa22c4 Compare January 9, 2025 14:11
@blizzz
Copy link
Member Author

blizzz commented Jan 9, 2025

Rebased, adjusted, and fixed a logic i had in, and sorting for share recipients works now.

@blizzz blizzz requested a review from juliusknorr January 9, 2025 14:12
@blizzz
Copy link
Member Author

blizzz commented Jan 9, 2025

/backport to stable0.8

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Jan 9, 2025
@blizzz blizzz merged commit 467c8d7 into main Jan 9, 2025
63 checks passed
@blizzz blizzz deleted the fix/1524/sort-views-hide-not-null branch January 9, 2025 21:06
@backportbot backportbot bot removed the backport-request Pending backport by the backport-bot label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants