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

refactor(files): Drop unneeded initial state #47016

Merged
merged 2 commits into from
Aug 14, 2024

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Aug 3, 2024

Summary

The initial state is no longer used, it was only used in legacy UI and in the f2v rewrite it was only used for the id which can be loaded just from the URL.

Checklist

@susnux susnux added feature: files ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring) labels Aug 3, 2024
@susnux susnux requested a review from skjnldsv as a code owner August 3, 2024 12:08
Base automatically changed from fix/open-file to master August 3, 2024 19:08
@skjnldsv skjnldsv requested review from a team, Fenn-CS, szaimen and sorbaugh and removed request for a team August 6, 2024 10:45
@skjnldsv skjnldsv added the 3. to review Waiting for reviews label Aug 6, 2024
@skjnldsv skjnldsv added this to the Nextcloud 30 milestone Aug 6, 2024
This was referenced Aug 6, 2024
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

🐘

@skjnldsv skjnldsv mentioned this pull request Aug 13, 2024
@susnux
Copy link
Contributor Author

susnux commented Aug 13, 2024

/compile

@nickvergessen
Copy link
Member

The rebase broke

@susnux
Copy link
Contributor Author

susnux commented Aug 13, 2024

The rebase broke

That was the UI toggle 👀

@@ -42,13 +42,21 @@
public function run(): SetupResult {
$datadir = str_replace(\OC::$SERVERROOT . '/', '', $this->config->getSystemValue('datadirectory', ''));

$dataUrl = $this->urlGenerator->getWebroot() . '/' . $datadir . '/.ocdata';
$dataUrl = $this->urlGenerator->getWebroot() . '/' . $datadir . '/.ncdata';

Check notice

Code scanning / Psalm

PossiblyInvalidOperand Note

Cannot concatenate with a array<array-key, string>|string
@susnux
Copy link
Contributor Author

susnux commented Aug 13, 2024

Fixed.

@susnux
Copy link
Contributor Author

susnux commented Aug 13, 2024

/compile

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

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

Looks good.

To make eslint happy:

diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue
index f0ac8ba3d70..cb38d744738 100644
--- a/apps/files/src/components/FilesListVirtual.vue
+++ b/apps/files/src/components/FilesListVirtual.vue
@@ -64,7 +64,6 @@ import type { UserConfig } from '../types'

 import { getFileListHeaders, Folder, View, getFileActions, FileType } from '@nextcloud/files'
 import { showError } from '@nextcloud/dialogs'
-import { loadState } from '@nextcloud/initial-state'
 import { translate as t } from '@nextcloud/l10n'
 import { defineComponent } from 'vue'

@@ -198,7 +197,7 @@ export default defineComponent({
                },

                openFile: {
-                       handler(open: boolean) {
+                       handler() {
                                // wait for scrolling and updating the actions to settle
                                this.$nextTick(() => {
                                        if (this.fileId && this.openFile) {

susnux and others added 2 commits August 14, 2024 09:31
The initial state is no longer used, it was only used in legacy UI and in the f2v rewrite
it was only used for the `id` which can be loaded just from the URL.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@skjnldsv skjnldsv merged commit 4920f90 into master Aug 14, 2024
139 of 148 checks passed
@skjnldsv skjnldsv deleted the refactor/cleanup-files-view branch August 14, 2024 07:43
@artonge
Copy link
Contributor

artonge commented Aug 28, 2024

/backport to stable29

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 feature: files ♻️ refactor Refactor code (not a bug fix, not a feature just refactoring)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants