Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Bookmark multi-select #5056

Merged
merged 2 commits into from
Oct 24, 2016
Merged

Bookmark multi-select #5056

merged 2 commits into from
Oct 24, 2016

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Oct 22, 2016

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

Updates required to sortableTable in order to support multi-drag

  • sortableTable selection is now state based (no longer queries DOM)
  • code was refactored (logic should be exactly the same) to support being state based
  • if multiple items are selected, a different drag handler is applied (so all rows can be sent, not just one)
  • if multiple items are selected and there is a drag handler, a dragImage (stack of papers) will be applied on cursor

Updated functionality on about:bookmarks:

  • Existing about:history functionality (including multiple table selection) works great
  • about:bookmarks now handle multi-select (for context menus). You can delete multiple entries, etc
  • You can select and move multiple items within the same folder OR into a new folder
  • The folder view (left) will highlight itself orange when a bookmark (or bookmarks) or folder is dragged over it. This also bolds the text and changes icon to an open folder.

Fixes #1005

Includes follow up of feedback for

#4834 (review)
#4488 (review)

Auditors

@darkdh, @bbondy

Screenshots

cc @bradleyrichter

multiple selection
multi-select

multiple items dragged (notice cursor)
multiple-drag

context menu for multiple selected items (ex: delete all selected)
context-menu

Updates required to sortableTable in order to support multi-drag
- sortableTable selection is now state based (no longer queries DOM)
- code was refactored (logic should be exactly the same) to support being state based
- if multiple items are selected, a different drag handler is applied (so all rows can be sent, not just one)
- if multiple items are selected and there is a drag handler, a dragImage (stack of papers) will be applied on cursor

With regards to about:bookmarks:
- Existing about:history functionality (including multiple table selection) works great
- about:bookmarks now handle multi-select (for context menus). You can delete multiple entries, etc
- You can select and move multiple items within the same folder OR into a new folder

Fixes #1005

Auditors:
@darkdh, @bbondy
onClick (e) {
/**
* If you want multi-select to span multiple tables, you can
* provide a single React.Component as the state owner.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe also specify state owner must possesses state.selection property

Copy link
Member Author

Choose a reason for hiding this comment

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

done- thanks 😄

@darkdh
Copy link
Member

darkdh commented Oct 23, 2016

lgtm

@@ -31,7 +34,7 @@ class DeleteHistoryEntryButton extends ImmutableComponent {
if (e && e.preventDefault) {
e.preventDefault()
}
// BSCTODO: ...
// BSCTODO: delete the selected entry
Copy link
Member

Choose a reason for hiding this comment

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

todo format is TODO(bsclifton): delete the selected entry

@bbondy
Copy link
Member

bbondy commented Oct 24, 2016

++ :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants