WIP: reduce card action rail clutter
This commit is contained in:
@@ -57,7 +57,7 @@ Use this checklist before a release or after changes to panel, pasteboard, setti
|
|||||||
24. Select a file, rich text, or URL card and confirm the selected-card rail exposes `Paste Plain Text`, the corner source/kind badge remains visible, and on a narrow shelf secondary actions collapse behind `More` instead of overflowing the card.
|
24. Select a file, rich text, or URL card and confirm the selected-card rail exposes `Paste Plain Text`, the corner source/kind badge remains visible, and on a narrow shelf secondary actions collapse behind `More` instead of overflowing the card.
|
||||||
25. Confirm card footers do not show `Unknown` for clips without a source app, and confirm used clips show their usage count beside the source app.
|
25. Confirm card footers do not show `Unknown` for clips without a source app, and confirm used clips show their usage count beside the source app.
|
||||||
26. Confirm card headers use readable relative ages such as `3 minutes ago` or `2 hours ago`, including when viewing a named collection.
|
26. Confirm card headers use readable relative ages such as `3 minutes ago` or `2 hours ago`, including when viewing a named collection.
|
||||||
27. Confirm the selected card shows a green corner Stack control, and that clips added to Stack keep a visible corner indicator when selection moves away.
|
27. Confirm the selected card shows a green corner Stack control, the action rail does not duplicate Stack, and clips added to Stack keep a visible corner indicator when selection moves away.
|
||||||
|
|
||||||
## Copy And Paste
|
## Copy And Paste
|
||||||
|
|
||||||
|
|||||||
@@ -2983,7 +2983,6 @@ private final class ClipboardItemCardView: NSView, NSDraggingSource {
|
|||||||
|
|
||||||
specs.append(ActionRailButtonSpec(itemIsPinned ? "pin.slash" : "pin", toolTip: pinTitle, action: #selector(togglePinFromMenu), overflowPriority: 30))
|
specs.append(ActionRailButtonSpec(itemIsPinned ? "pin.slash" : "pin", toolTip: pinTitle, action: #selector(togglePinFromMenu), overflowPriority: 30))
|
||||||
specs.append(ActionRailButtonSpec("plus", toolTip: "Collect", action: #selector(showCollectionMenuFromAction(_:))))
|
specs.append(ActionRailButtonSpec("plus", toolTip: "Collect", action: #selector(showCollectionMenuFromAction(_:))))
|
||||||
specs.append(ActionRailButtonSpec("square.stack.3d.up", toolTip: itemIsStacked ? "Remove from Stack" : "Add to Stack", action: #selector(toggleStackFromMenu)))
|
|
||||||
|
|
||||||
if canEditText {
|
if canEditText {
|
||||||
specs.append(ActionRailButtonSpec("pencil", toolTip: "Edit", action: #selector(editTextFromMenu), overflowPriority: 50))
|
specs.append(ActionRailButtonSpec("pencil", toolTip: "Edit", action: #selector(editTextFromMenu), overflowPriority: 50))
|
||||||
|
|||||||
@@ -411,8 +411,8 @@ final class ClipboardPanelViewTests: XCTestCase {
|
|||||||
drainMainQueue()
|
drainMainQueue()
|
||||||
fixture.window.contentView?.layoutSubtreeIfNeeded()
|
fixture.window.contentView?.layoutSubtreeIfNeeded()
|
||||||
|
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Pin", "Collect", "Add to Stack", "Edit", "Preview", "Delete"])
|
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Pin", "Collect", "Edit", "Preview", "Delete"])
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 238)
|
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 210)
|
||||||
XCTAssertFalse(fixture.view.debugFirstCardFooterDetailIsHidden)
|
XCTAssertFalse(fixture.view.debugFirstCardFooterDetailIsHidden)
|
||||||
XCTAssertFalse(fixture.view.debugFirstCardHeaderBadgeIsHidden)
|
XCTAssertFalse(fixture.view.debugFirstCardHeaderBadgeIsHidden)
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardHeaderBadgeFrame.maxX, 320, accuracy: 0.5)
|
XCTAssertEqual(fixture.view.debugFirstCardHeaderBadgeFrame.maxX, 320, accuracy: 0.5)
|
||||||
@@ -425,7 +425,7 @@ final class ClipboardPanelViewTests: XCTestCase {
|
|||||||
fixture.viewModel.selectFirstItem()
|
fixture.viewModel.selectFirstItem()
|
||||||
fixture.window.contentView?.layoutSubtreeIfNeeded()
|
fixture.window.contentView?.layoutSubtreeIfNeeded()
|
||||||
XCTAssertEqual(fixture.viewModel.visibleItems.first?.kind, .file)
|
XCTAssertEqual(fixture.viewModel.visibleItems.first?.kind, .file)
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Paste Plain Text", "Collect", "Add to Stack", "Preview", "Open", "More"])
|
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Paste Plain Text", "Collect", "Preview", "Open", "Reveal", "More"])
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 238)
|
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 238)
|
||||||
XCTAssertFalse(fixture.view.debugFirstCardFooterDetailIsHidden)
|
XCTAssertFalse(fixture.view.debugFirstCardFooterDetailIsHidden)
|
||||||
XCTAssertFalse(fixture.view.debugFirstCardHeaderBadgeIsHidden)
|
XCTAssertFalse(fixture.view.debugFirstCardHeaderBadgeIsHidden)
|
||||||
@@ -441,7 +441,7 @@ final class ClipboardPanelViewTests: XCTestCase {
|
|||||||
fixture.window.contentView?.layoutSubtreeIfNeeded()
|
fixture.window.contentView?.layoutSubtreeIfNeeded()
|
||||||
|
|
||||||
XCTAssertEqual(fixture.view.debugCardDensity, "compact")
|
XCTAssertEqual(fixture.view.debugCardDensity, "compact")
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Paste Plain Text", "Collect", "Add to Stack", "Preview", "More"])
|
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Paste Plain Text", "Collect", "Preview", "Open", "More"])
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 196)
|
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 196)
|
||||||
XCTAssertLessThanOrEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 197)
|
XCTAssertLessThanOrEqual(fixture.view.debugFirstCardVisibleActionRailWidth, 197)
|
||||||
XCTAssertFalse(fixture.view.debugFirstCardHeaderBadgeIsHidden)
|
XCTAssertFalse(fixture.view.debugFirstCardHeaderBadgeIsHidden)
|
||||||
@@ -889,7 +889,8 @@ final class ClipboardPanelViewTests: XCTestCase {
|
|||||||
fixture.view.debugFirstCardMenuTitles,
|
fixture.view.debugFirstCardMenuTitles,
|
||||||
["Paste", "Copy", "Rename...", "Remove from Stack", "Paste Stack Next", "Copy Stack Next", "Clear Stack", "Edit", "Quick Look", "Pin", "Add to Collection", "Capture Rules", "-", "Open", "Reveal in Finder", "-", "Delete"]
|
["Paste", "Copy", "Rename...", "Remove from Stack", "Paste Stack Next", "Copy Stack Next", "Clear Stack", "Edit", "Quick Look", "Pin", "Add to Collection", "Capture Rules", "-", "Open", "Reveal in Finder", "-", "Delete"]
|
||||||
)
|
)
|
||||||
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Pin", "Collect", "Remove from Stack", "Edit", "Preview", "Delete"])
|
XCTAssertEqual(fixture.view.debugFirstCardVisibleActionLabels, ["Paste", "Copy", "Pin", "Collect", "Edit", "Preview", "Delete"])
|
||||||
|
XCTAssertEqual(fixture.view.debugStackCornerLabels, ["Remove from Stack"])
|
||||||
}
|
}
|
||||||
|
|
||||||
func testStackCornerButtonTogglesAndPersistsForQueuedCards() {
|
func testStackCornerButtonTogglesAndPersistsForQueuedCards() {
|
||||||
@@ -903,6 +904,7 @@ final class ClipboardPanelViewTests: XCTestCase {
|
|||||||
|
|
||||||
XCTAssertEqual(fixture.view.debugStackCornerLabels, ["Add to Stack", "Add to Stack"])
|
XCTAssertEqual(fixture.view.debugStackCornerLabels, ["Add to Stack", "Add to Stack"])
|
||||||
XCTAssertEqual(fixture.view.debugStackCornerHiddenStates, [false, true])
|
XCTAssertEqual(fixture.view.debugStackCornerHiddenStates, [false, true])
|
||||||
|
XCTAssertFalse(fixture.view.debugFirstCardVisibleActionLabels.contains("Add to Stack"))
|
||||||
XCTAssertGreaterThan(fixture.view.debugFirstCardStackCornerFrame.maxX, 290)
|
XCTAssertGreaterThan(fixture.view.debugFirstCardStackCornerFrame.maxX, 290)
|
||||||
|
|
||||||
fixture.view.debugPressFirstCardStackCornerButton()
|
fixture.view.debugPressFirstCardStackCornerButton()
|
||||||
|
|||||||
Reference in New Issue
Block a user