Skip to content

[stable32] refactor: files list config prefixes#6889

Open
backportbot-libresign[bot] wants to merge 12 commits intostable32from
backport/6888/stable32
Open

[stable32] refactor: files list config prefixes#6889
backportbot-libresign[bot] wants to merge 12 commits intostable32from
backport/6888/stable32

Conversation

@backportbot-libresign
Copy link

Backport of PR #6888

Update AccountService to use prefixed naming for files list related
user configuration keys following the existing pattern used by
id_docs_* and crl_* configs.

Changes:
- grid_view → files_list_grid_view
- signer_identify_tab → files_list_signer_identify_tab
- sorting_mode → files_list_sorting_mode
- sorting_direction → files_list_sorting_direction
- filter_modified → files_list_filter_modified
- filter_status → files_list_filter_status

This prevents namespace pollution and provides better organization
for configuration keys.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Remove tests for inline migration logic that was moved to a proper
database migration step. The migration is now handled by
Version17001Date20260210000000.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update the filesSorting Pinia store to load and save configuration
using the new files_list_ prefixed keys:
- sorting_mode → files_list_sorting_mode
- sorting_direction → files_list_sorting_direction

This aligns the frontend with the backend refactoring and maintains
consistency with existing patterns like id_docs_* configs.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update test expectations to match the new prefixed configuration
keys (files_list_sorting_mode, files_list_sorting_direction) used
in the refactored filesSorting store.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…d_view

Update grid view toggle and conditional rendering to use the new
prefixed config key files_list_grid_view in:
- FilesList.vue: Main list view toggle button and state
- FilesListVirtual.vue: Component selection based on view mode
- VirtualList.vue: CSS classes for grid/list layout

Maintains functionality while following the new naming convention.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update preview size calculation to use files_list_grid_view config
key. The component now requests 128x128 previews for grid view or
32x32 for list view based on the new prefixed configuration key.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…er_identify_tab

Update signer identification tab persistence to use the new prefixed
config key files_list_signer_identify_tab. This maintains the user's
last selected tab (email, account, etc.) across sessions using the
consistent naming pattern.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Extend Version17001Date20260210000000 migration to automatically
migrate user configuration keys from old unprefixed names to new
prefixed format during app update.

Migrates:
- grid_view → files_list_grid_view
- signer_identify_tab → files_list_signer_identify_tab
- sorting_mode → files_list_sorting_mode
- sorting_direction → files_list_sorting_direction
- filter_modified → files_list_filter_modified
- filter_status → files_list_filter_status

The migration:
- Queries users with old config keys
- Copies values to new keys only if new keys don't exist
- Removes old keys after successful migration
- Handles both migration and cleanup cases
- Runs once during update (not a repair step)

This ensures existing users retain their preferences without any
manual intervention when updating the app.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Import IQueryBuilder interface
- Replace createParameter with createNamedParameter for better consistency
- Use IQueryBuilder::PARAM_STR_ARRAY instead of Doctrine DBAL constant
- Simplify query building by removing separate setParameter call

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Migration tests require complex database mocking and are typically not
necessary for infrastructure code. The migration functionality is better
validated through integration testing or manual verification.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 0. Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant