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

Create an app configuration #1258

Conversation

MarcelRobitaille
Copy link
Collaborator

@MarcelRobitaille MarcelRobitaille commented Oct 18, 2022

Fixes #1067

Move the AppNavigationSettings from the sidebar to a AppSettingsDialog modal that covers the screen.

This is what it should look like:

image

This makes it easy for us to add more configuration options for things like notifications and alarms without cluttering the sidebar.

@MarcelRobitaille MarcelRobitaille force-pushed the 1067-create-an-app-configuration branch 3 times, most recently from a83575c to f1b156b Compare October 18, 2022 00:25
@github-actions
Copy link

github-actions bot commented Oct 18, 2022

Unit Test Results

     27 files       27 suites   7m 4s ⏱️
   476 tests    476 ✔️ 0 💤 0
4 284 runs  4 283 ✔️ 1 💤 0

Results for commit 5e5cb6f.

♻️ This comment has been updated with latest results.

@MarcelRobitaille
Copy link
Collaborator Author

@christianlupus That's weird, running npm run styleling locally doesn't warn about anything for me. I ran prettier, eslint, and styleling before pushing. BTW, I'm getting a deprecation warning with eslint now.

@christianlupus
Copy link
Collaborator

Are you on the latest styleling config? There was a PR recently #1254.

@MarcelRobitaille
Copy link
Collaborator Author

@christianlupus I guess I branched off before that. Also, the eslint warning was saying that ~/.eslintrc is deprecated, so it has nothing to do with this project. Sorry.

Copy link
Collaborator

@christianlupus christianlupus left a comment

Choose a reason for hiding this comment

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

The PR has some problems yet. The component NcButton does not yet exist. It is part of the @nextcloud/vue v6 package. We are stuck with v5. Like this, the button is non-functional.

When changing the button, I get an error in the JS console:
grafik

Additionally, I cannot change the folder of the cookbook. I cannot navigate in the modal dialog to select a folder.

Can you confirm these issues?

src/components/SettingsDialog.vue Outdated Show resolved Hide resolved
src/components/SettingsDialog.vue Show resolved Hide resolved
src/components/SettingsDialog.vue Show resolved Hide resolved
src/components/SettingsDialog.vue Outdated Show resolved Hide resolved
src/components/SettingsDialog.vue Outdated Show resolved Hide resolved
@MarcelRobitaille
Copy link
Collaborator Author

MarcelRobitaille commented Oct 18, 2022

@christianlupus I called it NcButton and not Button because I got an error something like Button is a reserved word in HTML. There shouldn't be a problem with import NcButton from '@nextcloud/vue/dist/Components/Button, is there? It's fewer things to change when we finally migrate too.

I will have a look at resolving the other problems.

Thanks for reviewing 😄.

@MarcelRobitaille
Copy link
Collaborator Author

Here is the error when renaming NcButton to Button:

/home/marcel/code/cookbook/src/components/SettingsDialog.vue
  101:9  error  Name "Button" is reserved in HTML  vue/no-reserved-component-names

I think that is the cause of the errors in the screenshot you posted.

@christianlupus
Copy link
Collaborator

@christianlupus I called it NcButton and not Button because I got an error something like Button is a reserved word in HTML. There shouldn't be a problem with import NcButton from '@nextcloud/vue/dist/Components/Button, is there? It's fewer things to change when we finally migrate too.

Ahh, I am sorry, I missed that line. I assumed you were using import {NcButton} from .... You are perfectly fine with that. Sorry for bothering you.

Thanks for reviewing smile.
You are welcome.

Please tell me when you finished with the entire PR. Thanks!

@MarcelRobitaille
Copy link
Collaborator Author

MarcelRobitaille commented Oct 18, 2022

No worries.

I fixed the problem with the reindex button.

I am not sure what is going on with the file picker. Maybe it doesn't like having 2 overlays open at a time. I added this code in the developer console, and once the filepicker dialog is open, no events are fired at all:

document.addEventListener('click', e => console.log(e))

I'm not really sure where this global OC is coming from. I can't find any documentation for it. I don't really like this kind of magic API, I prefer to import what I'm using explicitly. It's different from this, right?

I was not able to reproduce the error in your screenshot. Did you use the code exactly as it is here or did you replace NcButton with Button locally?

@christianlupus
Copy link
Collaborator

I'm not really sure where this global OC is coming from. I can't find any documentation for it. I don't really like this kind of magic API, I prefer to import what I'm using explicitly. It's different from this, right?

I do not know for sure. It comes from here. I have read of it in the past but I do no longer find it.

I was not able to reproduce the error in your screenshot. Did you use the code exactly as it is here or did you replace NcButton with Button locally?

Yes, I changed that locally. I have to retest it.

@MarcelRobitaille
Copy link
Collaborator Author

I found the function: https://github.com/nextcloud/server/blob/master/core/src/OC/dialogs.js#L229-L572

It seems like a bug, but I'm not sure whether to report it to @nextcloud/vue or nextcloud/server.

@MarcelRobitaille
Copy link
Collaborator Author

After hours of debugging, I found that this bug is not present in @nextcloud/vue <= 5.3.1. We could downgrade to this version until we move to 7.0.0, or we could try to upstream a patch and have it backported to 5.4.1.

@MarcelRobitaille
Copy link
Collaborator Author

My guess is that the cause is nextcloud-libraries/nextcloud-vue#2654. It seems like it was already fixed in later versions. Should we request a backport?

@christianlupus
Copy link
Collaborator

I think a backport might be the cleanest solution.

Let's see, if @nextcloud/vuejs do know something about this issue. Can anyone of you confirm that there might be a problem and there is in fact a chance this can be fixed with the 5.x branch?

@MarcelRobitaille MarcelRobitaille force-pushed the 1067-create-an-app-configuration branch 2 times, most recently from b9f599a to d6be59b Compare November 1, 2022 14:00
@github-actions
Copy link

github-actions bot commented Nov 1, 2022

Test Results

     21 files     952 suites   5m 19s ⏱️
   495 tests    495 ✔️ 0 💤 0
3 465 runs  3 464 ✔️ 1 💤 0

Results for commit b0dd3c6.

♻️ This comment has been updated with latest results.

@christianlupus christianlupus added this to the Release 0.10.1 milestone Nov 1, 2022
@christianlupus
Copy link
Collaborator

ATM there are some commits that need fixing. I will wait and set this PR to be a draft. You can mark as ready for review once, you are done, @MarcelRobitaille.

@christianlupus christianlupus marked this pull request as draft November 1, 2022 14:09
@MarcelRobitaille
Copy link
Collaborator Author

I rebased the NC25 changes. Now we're getting hung up on this open issue: nextcloud-libraries/nextcloud-vue#3386

@christianlupus
Copy link
Collaborator

👍 for the rebase, 👎 for the upstream bug.

@MarcelRobitaille
Copy link
Collaborator Author

The upstream issue was closed, but the fixes still haven't made it into a stable version.

MarcelRobitaille and others added 7 commits November 30, 2022 22:56
Fixes nextcloud#1067

Move the AppNavigationSettings from the sidebar to a AppSettingsDialog
modal that covers the screen.

Signed-off-by: Marcel Robitaille <mail@marcelrobitaille.me>
Signed-off-by: Marcel Robitaille <mail@marcelrobitaille.me>
Signed-off-by: Marcel Robitaille <mail@marcelrobitaille.me>
Signed-off-by: Christian Wolf <github@christianwolf.email>
Now the reindex method is in this same component, so instead of
emitting, just call that method

Signed-off-by: Marcel Robitaille <mail@marcelrobitaille.me>
Signed-off-by: Marcel Robitaille <mail@marcelrobitaille.me>
Signed-off-by: Marcel Robitaille <mail@marcelrobitaille.me>
@MarcelRobitaille
Copy link
Collaborator Author

nextcloud/vue 7.10.0 was recently released, which fixes the "too much recursion" issue. I've just tested it and now everything seems to be working. The settings modal works and I can interact with the "Recipe folder" modal.

@MarcelRobitaille MarcelRobitaille marked this pull request as ready for review December 1, 2022 00:55
Copy link
Collaborator

@christianlupus christianlupus left a comment

Choose a reason for hiding this comment

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

Seems good to me now. LGTM

@christianlupus christianlupus merged commit d120b15 into nextcloud:master Dec 14, 2022
@MarcelRobitaille MarcelRobitaille deleted the 1067-create-an-app-configuration branch December 14, 2022 11:08
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.

Create an app configuration
2 participants