fix: smart playlist UX polish — layout, defaults, free-form input, case-insensitive matching
Details view: - Skip evaluation on new playlists (was returning all 25k tracks) - Go straight to editor on auto-edit instead of awaiting loadTracks Editor: - Default sort to Random instead of None, remove None option - Hide sort direction button when sort is Random - Fixed-width field (160px) and operator (140px) columns, value fills remaining space - Preview fills remaining vertical space (flex layout) instead of fixed 200px max-height - Preview scrolls independently while rules/options stay pinned Combobox: - Accept free-form text on blur and Enter — no longer requires selection from dropdown - Enables typing values like 'indie' that may not be exact DB entries Backend: - Case-insensitive text matching: COLLATE NOCASE on is/is_not/is_any_of operators - Applies to both regular fields and genre subqueries - LIKE operators were already case-insensitive (SQLite default)
This commit is contained in:
@@ -261,8 +261,11 @@ export class SmartPlaylistDetails extends LitElement {
|
||||
|
||||
.editor-container {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
overflow: hidden;
|
||||
padding: 0 20px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
}
|
||||
`];
|
||||
|
||||
@@ -270,13 +273,17 @@ export class SmartPlaylistDetails extends LitElement {
|
||||
// Lifecycle
|
||||
// =================================================================
|
||||
|
||||
override async connectedCallback() {
|
||||
override connectedCallback() {
|
||||
super.connectedCallback();
|
||||
await this.loadTracks();
|
||||
|
||||
if (this.autoEdit) {
|
||||
// Skip evaluation for new playlists — go straight to editor.
|
||||
this.autoEdit = false;
|
||||
this.loading = false;
|
||||
this.tracks = [];
|
||||
this.handleEditRules();
|
||||
} else {
|
||||
void this.loadTracks();
|
||||
}
|
||||
|
||||
this.playlistDeletedCleanup = EventsOn(
|
||||
|
||||
Reference in New Issue
Block a user