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(files): sort not working after changing views #50161

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Jan 13, 2025

  • Resolves: #

Summary

Sorting the tabular view in files breaks if the view is changed twice.

How to reproduce?

  1. Open the files app and sort by size.
  2. Switch to another view, e.g. the "Personal files" view.
  3. Sort again by size -> still works
  4. Switch back to the main files view.
  5. Sort again by size -> sort order doesn't change

Problem: The global $navigation object is not reactive enough and misses some changes.

Before

2025-01-14.13-49-24.mp4

After

2025-01-14.13-51-11.mp4

TODO

  • Record screencasts (before vs. after)
  • Pray that cypress tests still pass
  • Add a cypress test to prevent regressions

Checklist

@st3iny st3iny self-assigned this Jan 13, 2025
@st3iny
Copy link
Member Author

st3iny commented Jan 13, 2025

/backport to stable30

@st3iny
Copy link
Member Author

st3iny commented Jan 13, 2025

/backport to stable29

@st3iny st3iny force-pushed the fix/files/sort-after-view-change branch from 446823a to 1c3ec2a Compare January 14, 2025 13:16
@st3iny st3iny marked this pull request as ready for review January 14, 2025 13:16
@st3iny st3iny requested a review from skjnldsv as a code owner January 14, 2025 13:16
@st3iny st3iny requested review from susnux and ShGKme January 14, 2025 13:16
apps/files/src/main.ts Outdated Show resolved Hide resolved
@st3iny st3iny added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Jan 14, 2025
@st3iny st3iny marked this pull request as draft January 14, 2025 14:54
@st3iny st3iny force-pushed the fix/files/sort-after-view-change branch 2 times, most recently from b97a3d2 to c966e04 Compare January 15, 2025 16:32
@st3iny st3iny marked this pull request as ready for review January 15, 2025 17:26
@st3iny st3iny added 3. to review Waiting for reviews technical debt and removed 2. developing Work in progress labels Jan 15, 2025
@st3iny st3iny requested a review from susnux January 15, 2025 17:26
Comment on lines -47 to -51
// Init Navigation Service
// This only works with Vue 2 - with Vue 3 this will not modify the source but return just a observer
const Navigation = Vue.observable(getNavigation())
Vue.prototype.$navigation = Navigation

Copy link
Contributor

Choose a reason for hiding this comment

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

🥳

Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

🚀

@st3iny st3iny force-pushed the fix/files/sort-after-view-change branch from 189daf0 to 18a670b Compare January 15, 2025 21:24
@st3iny st3iny added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 15, 2025
@st3iny st3iny enabled auto-merge January 15, 2025 21:25
@skjnldsv
Copy link
Member

apps/files/src/views/Navigation.cy.ts failure is related

@st3iny st3iny force-pushed the fix/files/sort-after-view-change branch from 18a670b to 835994a Compare January 16, 2025 07:57
@st3iny st3iny merged commit b2d1df7 into master Jan 16, 2025
120 checks passed
@st3iny st3iny deleted the fix/files/sort-after-view-change branch January 16, 2025 08:07
Copy link

backportbot bot commented Jan 16, 2025

The backport to stable29 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable29
git pull origin stable29

# Create the new backport branch
git checkout -b backport/50161/stable29

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 835994a8

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/50161/stable29

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish backport-request bug feature: files technical debt
Projects
Status: ☑️ Done
Development

Successfully merging this pull request may close these issues.

4 participants