Skip to content

feat: add photo set selector (selected / visible) to remove photos and activity creation #126

Description

@siculo

Summary

Add a reusable photo set selector to any plugin operation that works
on a subset of photos. The selector lets the user choose between
selected photos and visible photos (those currently shown in
the Lightroom grid). The same UI component is used in both the
remove-photos flow and the activity creation modal.

Motivation

Currently, remove photos always acts on the selected photos and
activity creation offers only "all project photos" or a manual
selection. Making the photo set explicit and consistent across
operations reduces surprises and gives the user direct control
without leaving the plugin dialog.

Scope

Plugin — shared photo set selector component

Implement a reusable UI component (radio buttons or popup menu)
with the following options, available wherever a photo subset must
be chosen:

Option Source SDK method
Selected photos Photos selected in Lightroom catalog:getMultipleSelectedOrAllPhotos()
Visible photos All photos currently shown in the grid catalog:getTargetPhotos() (no active selection)

The component must be callable from any dialog that needs it.

Plugin — remove photos

  • Add the photo set selector to the remove-photos confirmation dialog
  • Default: Selected photos
  • The confirmation message updates to reflect the chosen set and
    the resulting count

Plugin — activity creation modal

  • Extend the existing photo subset selector with two new options:
    Selected photos and Visible photos, in addition to the
    existing All project photos
  • Default: All project photos (preserves current behaviour)
  • The summary panel updates the photo count when the selection changes

API

  • No changes required; both flows already send an explicit
    photo_ids list (or null for all photos)

Documentation

  • Update the plugin user guide

Acceptance criteria

  • Remove-photos dialog shows the photo set selector defaulting
    to "Selected photos"
  • Activity creation modal shows all three options; "All project
    photos" remains the default
  • Selecting "Visible photos" uses catalog:getTargetPhotos()
    to build the photo list
  • Selecting "Selected photos" uses
    catalog:getMultipleSelectedOrAllPhotos() to build the list
  • Photo count in confirmation/summary reflects the chosen set
  • The selector component is implemented once and reused in both
    dialogs
  • No regression in existing remove-photos or activity creation
    behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions