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

Support multiple gitlab instances? #10

Closed
jas4711 opened this issue Nov 2, 2020 · 12 comments · Fixed by #93
Closed

Support multiple gitlab instances? #10

jas4711 opened this issue Nov 2, 2020 · 12 comments · Fixed by #93
Assignees
Labels
enhancement New feature or request

Comments

@jas4711
Copy link

jas4711 commented Nov 2, 2020

Hi! I have an account on gitlab.com and salsa.debian.org, both running gitlab. I can't seem to add more than one account to the nextcloud gitlab integration. Could this functionality be added?

@Maxence1502
Copy link

Hello !

I have 2 differents gitlab servers (for 2 companies) and I would like to see both with your app.
I can only add one server in the settings. Is it possible to add a 2 one ? Or more ?

@Magicrafter13
Copy link

Any news on this?

@Verequies
Copy link

Any updates? Would be great to see 2 or more servers at once.

@MB-Finski
Copy link
Contributor

Hmm.. This should be quite easy to implement in itself but having only a single dashboard widget for multiple accounts could be somewhat confusing.

Unfortunately, AFAIK, there's no way to currently dynamically spawn dashboard widgets without implementing a separate php class for each one. The related issue at the server repo was closed as stale, unfortunately: nextcloud/server#24658

Maybe there could be a selector for the gitlab instance that is shown? And always show the account with most recent notifications as default? Would this be satisfactory, until we get support for multiple dashboard widgets?

@jas4711
Copy link
Author

jas4711 commented Oct 13, 2023

Yes I think some UX stuff in the dashboard widget would be acceptable meanwhile.

I think it should be possible to spawn multiple widgets dynamically -- in my use-case, the work focus mostly overlap so I don't care if I see gitlab.com and salsa.debian.org gitlab issues on the same widget, but in some use-cases you really don't want that overlap.

Another ugly workaround would be to actually add a couple of numbered classes, so you add a PHP class gitlab-widget-1, gitlab-widget-2, gitlab-widget-3, etc... and then disable the unused classes for display. I reckon supporting five instance through this mechanism would be sufficient for most use-cases.

@KaeTuuN
Copy link

KaeTuuN commented Oct 13, 2023

This would be much better than nothing/now.
Some remarks I have:

  1. Is it worth to code that, if there will be support for multiple instances per widget class in the future?
  2. If there are plans to integrate [Feature Request] "Mark all (visible) as read" Button #68 it must be ensured, that no hidden notifications will be deleted there.
  3. When will the selector be triggered?
  • During cron?
  • Each removing off a notification?
  • Just on page (re-)loading?
  • On a separate reload button on the widget?

@MB-Finski
Copy link
Contributor

MB-Finski commented Oct 13, 2023

Oh, with the selector, I just meant a UX switch/buttons to switch the visible account. In this case, mark all visible as read would only apply to those notifications that are shown at the time. At each reload of the page the shown account would default to the one with the most recent notification.

Regarding defining a finite amount of widget classes, we actually had a discussion about using anonymous classes, as well, as that would avoid quite a bit of duplicate code. But anon classes also cannot be spun up dynamically so it's still "hacky". Aliases would be an even more risky solution but even that creates its own trouble with session handling. Enabling this by design at the server repo side is just the right way to go, IMHO.

I'll try and find some time to implement multiple accounts/instances some time soon -- I'll keep you updated.

@KaeTuuN
Copy link

KaeTuuN commented Oct 13, 2023

Oh, with the selector, I just meant a UX switch/buttons to switch the visible account...

Thanks for clarification!

Enabling this by design at the server repo side is just the right way to go, IMHO.

Then I hope, that it will be implemented rather sooner then later. :-)

@DaphneMuller
Copy link

@kyteinsky could you please look into a rough effort estimate for this feature request?

@kyteinsky
Copy link
Contributor

kyteinsky commented Apr 17, 2024

hey, the search provider functionality can be easily extended but Nextcloud does not support adding multiple dashboard widgets dynamically. If that is acceptable, it is a 2-day work tops.

Or as Sami said above, hacky solutions could make that possible, or with an account selector. Then maybe 3 days of work should do.

@DaphneMuller
Copy link

Thanks for giving a pragmatic plan with different scopes to chose from, really appreciated. We will schedule this for the development cycle of Nextcloud 30

@KaeTuuN
Copy link

KaeTuuN commented Aug 20, 2024

Thanks to @provokateurin and everybody else who might be involved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants