Skip to content

Conversation

@richardtks
Copy link
Contributor

Description

  • User now able to reorder the storage in the side navigation bar and preference settings.

Screenshot

  1. Re-order storage in the side navigation bar
    reorder-storage-nav-list
  2. Re-order storage in the preferences
    reorder-storage-pref

Issue fixed

#1910

Type of changes

  • ⚪ Bug fix (Change that fixed an issue)
  • ⚪ Breaking change (Change that can cause existing functionality to change)
  • ⚪ Improvement (Change that improves the code. Maybe performance or development improvement)
  • 🔘 Feature (Change that adds new functionality)
  • ⚪ Documentation change (Change that modifies documentation. Maybe typo fixes)

Checklist:

  • 🔘 My code follows the project code style
  • 🔘 I have written test for my code and it has been tested
  • 🔘 All existing tests have been passed
  • 🔘 I have attached a screenshot/video to visualize my change if possible

@ZeroX-DG ZeroX-DG added the awaiting review ❇️ Pull request is awaiting a review. label Dec 4, 2018
const isFolded = config.isSideNavFolded

let itemIndex = -1
const storageList = data.storageMap.map((storage, key) => {
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain how can you use the map function here? I thought storageMap was a map and it doesn't have map function? The feature works great, but I'm not quite understand there 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the storageMap was a map, but it is not the javascript built-in map, it was the MutableMap from Dick Choi and it provides the map function, please refer here: MutableMap

@ZeroX-DG ZeroX-DG added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. approved 👍 Pull request has been approved by sufficient reviewers. and removed awaiting review ❇️ Pull request is awaiting a review. awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. labels Dec 8, 2018
@ZeroX-DG ZeroX-DG added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. and removed approved 👍 Pull request has been approved by sufficient reviewers. labels Dec 16, 2018
@Flexo013
Copy link
Contributor

Flexo013 commented May 7, 2020

@richardtks Could you provide an example of how this is handled when the sidebar is collapsed?

@richardtks
Copy link
Contributor Author

@Flexo013, For the collapsed side bar, re-order is not allowed as the there is no space for the handler to show in the side navigation.

Here is how it looks like:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants