zulip-desktop icon indicating copy to clipboard operation
zulip-desktop copied to clipboard

Make the org tab list draggable in left sidebar

Open akashnimare opened this issue 6 years ago • 20 comments

We should make the organization list in the left sidebar draggable so that users can reorder the added organizations.

image

Something like this -

On a technical level we need to make following changes when the user drags the org tabs -

  • Update the index of org in the menu item

image

  • Update the index of org in the left sidebar

  • Update the tooltip

akashnimare avatar Aug 28 '18 18:08 akashnimare

sortable.js is usually the way to do this sort of reordering.

timabbott avatar Sep 27 '18 21:09 timabbott

@zulipbot claim

kanishk98 avatar Dec 09 '18 06:12 kanishk98

@timabbott I'm sorry, I don't understand. What do you mean when you say sortable.js? I can't find any file by that name in the repo.

kanishk98 avatar Dec 09 '18 06:12 kanishk98

sortable.js is a JavaScript library for reorderable drag-and-drop ( they have a repo on GitHub) . Akash has already done a lot of work on this, you can check out the org-tab-drop branch in this repo and then continue from there.

abhigyank avatar Dec 09 '18 06:12 abhigyank

@kanishk98 yeah the dragging part is done in the org-tab-drag. The remaining part is -

  • Update the tooltips
  • Update the index of the orgs

akashnimare avatar Dec 09 '18 18:12 akashnimare

I've been trying to solve the tooltips problem, and I'd like some clarity here: the initTabs() method in app/renderer/js/main.js calls initServer() using the following code:

const servers = DomainUtil.getDomains();
if (servers.length > 0) {
	for (let i = 0; i < servers.length; i++) {
		this.initServer(servers[i], i);
		DomainUtil.updateSavedServer(servers[i].url, i);
		this.activateTab(i);
	}

If we're looking to update the server icons, should we also be changing the json file containing domain information? (Since DomainUtil.getDomains() uses that file to pass domains to servers)

kanishk98 avatar Dec 16 '18 11:12 kanishk98

I think in order to get everything right, we gotta save the index of the domain otherwise it would be difficult to keep track of all the indexes after dragging/reloading etc.

akashnimare avatar Dec 16 '18 13:12 akashnimare

Hello @kanishk98, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days.

You can reclaim this issue or claim any other issue by commenting @zulipbot claim on that issue.

Thanks for your contributions, and hope to see you again soon!

zulipbot avatar Dec 26 '18 14:12 zulipbot

I'm still on the issue, just been unwell these past few days. The cold's got to me, sorry. I'll get back to work on this tomorrow.

kanishk98 avatar Dec 27 '18 17:12 kanishk98

@zulipbot claim

manavmehta avatar Mar 03 '20 16:03 manavmehta

Hello @manavmehta, it looks like you've currently claimed 1 issue in this repository. We encourage new contributors to focus their efforts on at most 1 issue at a time, so please complete your work on your other claimed issues before trying to claim this issue again.

We look forward to your valuable contributions!

zulipbot avatar Mar 03 '20 16:03 zulipbot

@zulipbot I have already made two PRs that are pending for review. Also I am working on both of the issues. Please allow me to take this one up too.

manavmehta avatar Mar 03 '20 16:03 manavmehta

@manavmehta sure go ahead. I would suggest to build up on PR #617.

abhigyank avatar Mar 03 '20 16:03 abhigyank

Hi, is that feature available already? The discussion here is rather old, and I can't find a way to do that (or even in the settings). I'm on the macOS app. Thanks!

etanter avatar Sep 16 '21 18:09 etanter

It is not; the latest work is this stale PR: https://github.com/zulip/zulip-desktop/pull/1059

Contributions are welcome!

timabbott avatar Oct 15 '21 19:10 timabbott

I would really like to have this feature as well. Unfortunately it seems that the mentioned PR https://github.com/zulip/zulip-desktop/pull/1059 is stale. Are there updates happening somewhere else?

cossio avatar Aug 31 '22 22:08 cossio

@zulipbot claim

Aitchessbee avatar Mar 01 '24 18:03 Aitchessbee

Welcome to Zulip, @Aitchessbee! We just sent you an invite to collaborate on this repository at https://github.com/zulip/zulip-desktop/invitations. Please accept this invite in order to claim this issue and begin a fun, rewarding experience contributing to Zulip!

Here's some tips to get you off to a good start:

As you work on this issue, you'll also want to refer to the Zulip code contribution guide, as well as the rest of the developer documentation on that site.

See you on the other side (that is, the pull request side)!

zulipbot avatar Mar 01 '24 18:03 zulipbot

@Aitchessbee You have been unassigned from this issue because you have not made any updates for over 14 days. Please feel free to reclaim the issue if you decide to pick up again. Thanks!

zulipbot avatar Mar 11 '24 19:03 zulipbot

Still working on it!

Aitchessbee avatar Mar 12 '24 12:03 Aitchessbee