Skip to content

Albums: Preload more items for auto-completion in "Add to album" dialog#2152

Merged
lastzero merged 1 commit intophotoprism:developfrom
ppprism:patch-1
Mar 23, 2022
Merged

Albums: Preload more items for auto-completion in "Add to album" dialog#2152
lastzero merged 1 commit intophotoprism:developfrom
ppprism:patch-1

Conversation

@ppprism
Copy link
Contributor

@ppprism ppprism commented Mar 14, 2022

This is a small hotfix to the "Add photos to album" dialog.

If there are more than 1000 albums in photoprism, a problem arises in the user interface:

  • you cannot add photos to existing albums that are not included in the range
  • worse, it looks like there is no such album yet, leading to duplicate albums with same name when pressing add button

This pull requests increases the max album fetch count to 10000 as quickfix and removes the magic number, declaring MAX_COUNT as explicit constant.

Future improvements of REST API may one of the following:

  • include an "infinite count" flag, as the intention is always to provide all albums in autocomplete dialog
  • make count query parameter optional

Background:
I have a bunch of auto-generated albums (> 1000) from external sources and found it very confusing, that only one half of albums have been displayed in the autocomplete.


Acceptance Criteria:

  • Features and improvements are fully implemented so that they can be released at any time without additional work

This is a small change (projects with < 1000 albums not affected in any way), hence following points are neglected:

  • Automated unit and/or acceptance tests have been added to ensure the changes work as expected and to reduce repetitive manual work
  • User interface changes are fully responsive and have been tested on all major browsers and various devices
  • Database-related changes are compatible with SQLite and MariaDB
  • Translations have been / will be updated (specify if needed)
  • Documentation has been / will be updated (specify if needed)
  • Contributor License Agreement (CLA) has been signed

@CLAassistant
Copy link

CLAassistant commented Mar 14, 2022

CLA assistant check
All committers have signed the CLA.

@lastzero
Copy link
Member

Thanks! Apparently we didn't expect private users to have more than 1000 albums when implementing this...

@lastzero lastzero merged commit 6d4e517 into photoprism:develop Mar 23, 2022
@lastzero lastzero self-requested a review March 23, 2022 15:21
@lastzero lastzero added bug Something isn't working please-test Ready for acceptance test ux Impacts User Experience labels Mar 23, 2022
@lastzero lastzero changed the title Fix: Increase autocomplete dialog album count UX: Support up to 10,000 albums in the "Add to album" combo box Mar 24, 2022
@lastzero lastzero changed the title UX: Support up to 10,000 albums in the "Add to album" combo box UX: Preload more items for auto-completion in "Add to album" dialog Mar 25, 2022
@lastzero lastzero changed the title UX: Preload more items for auto-completion in "Add to album" dialog Albums: Preload more items for auto-completion in "Add to album" dialog Mar 25, 2022
@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released Available in the stable release ux Impacts User Experience

Projects

Status: Release 🌈

Development

Successfully merging this pull request may close these issues.

4 participants