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

Feature reorder dock items #477

Merged
merged 16 commits into from
Apr 20, 2022
Merged

Feature reorder dock items #477

merged 16 commits into from
Apr 20, 2022

Conversation

jav-solo
Copy link
Contributor

@jav-solo jav-solo commented Apr 18, 2022

Description

Adding the ability to re-order the dock icons in the sidebar

Related Pull Requests

[WIP] Feature drag and drop icons

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • Review requested

Screenshots

navigator-sidebar-demo.mov
inspector-demo.mov

@austincondiff
Copy link
Collaborator

austincondiff commented Apr 18, 2022

Please note that this will need to be applied to the navigator sidebar (left) and the inspector sidebar (right).

Also, keep in mind that we will eventually need the ability to drag these icons down to create a split sidebar like this. This is not required for this PR but we will need this at some point.

@austincondiff
Copy link
Collaborator

austincondiff commented Apr 18, 2022

Also, I believe @lilingxi01 is working on dragging to reorder tabs (please confirm). You might coordinate together so that we are consistent in the approach we are taking to do both of these.

@nanashili
Copy link
Contributor

We should just save the list in the preferences, so when the user opens the app again they can get the previous icon positions again.

@austincondiff
Copy link
Collaborator

austincondiff commented Apr 19, 2022

This should be saved and synced across all open workspaces, persisting after the app is closed and reopened. It should not be in the preferences UI or in preferences.json. In the View menu, we should have an item labeled “Reset Workspace Layout To Default” that resets this setting to default.

This setting should track icon location per pane, per sidebar. So for example, the stored state can look like this:

  • Navigator Sidebar
    • panel 1
      • project
      • source control
      • find
    • panel 2
      • debug
      • tasks
      • symbols
  • Inspector Sidebar
    • panel 1
      • source control
      • file
      • quick help

Updated #41 with this information.

@austincondiff
Copy link
Collaborator

Please also refer to #479 for additional context around what is planned for sidebar split panels.

@jav-solo jav-solo marked this pull request as ready for review April 19, 2022 16:30
@austincondiff austincondiff changed the title [WIP] Feature reorder dock items Feature reorder dock items Apr 19, 2022
Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

Please address the following items before we can merge:

  • The cursor should not turn into a "+" as the user hovers over other items.
  • The item being dragged should be fully opaque and the original should be 0% opacity.
  • As the user hovers, icons should animate to move out of the way to make room for the dropped item.
  • Axis should be locked to the X axis unless the cursor exits the sidebar dock (icon tab bar).

The overall interaction should feel like dragging to reorder tabs in Xcode or Finder.

@austincondiff
Copy link
Collaborator

When you are finished, please update the video in the PR description.

@jav-solo
Copy link
Contributor Author

jav-solo commented Apr 19, 2022

Please address the following items before we can merge:

  • The cursor should not turn into a "+" as the user hovers over other items.
  • The item being dragged should be fully opaque and the original should be 0% opacity.
  • As the user hovers, icons should animate to move out of the way to make room for the dropped item.
  • Axis should be locked to the X axis unless the cursor exits the sidebar dock (icon tab bar).

The overall interaction should feel like dragging to reorder tabs in Xcode or Finder.

It seems to be behaving as desired. Please see videos

@lukepistrol
Copy link
Member

Please make sure to also fix the SwiftLint errors. For more information on SwiftLint see this Wiki entry

@lukepistrol
Copy link
Member

lukepistrol commented Apr 19, 2022

Quick question: Is the order persistent? Meaning: is it saved to preferences.json?

@jav-solo
Copy link
Contributor Author

Quick question: Is the order persistent? Meaning: is it saved to preferences.json?

It is not. I mentioned that in issue #41. Realistically, I will not be able to complete that piece at this time.

@lukepistrol
Copy link
Member

Quick question: Is the order persistent? Meaning: is it saved to preferences.json?

It is not. I mentioned that in issue #41. Realistically, I will not be able to complete that piece at this time.

No problem 😉 just wanted to know

Copy link
Member

@lukepistrol lukepistrol left a comment

Choose a reason for hiding this comment

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

Code looks fine to me! Once @austincondiff approves we can merge 👍

Copy link
Collaborator

@austincondiff austincondiff left a comment

Choose a reason for hiding this comment

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

Looks fantastic, great work! 👏

@austincondiff austincondiff merged commit dd369b5 into CodeEditApp:main Apr 20, 2022
@austincondiff
Copy link
Collaborator

@allcontributors add @jav-solo for code

@allcontributors
Copy link
Contributor

@austincondiff

I've put up a pull request to add @jav-solo! 🎉

@jav-solo jav-solo deleted the feature-reorder-dock-items branch April 20, 2022 02:39
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.

4 participants