Skip to content

Edit Book Name allows for "." but will remove anything after it after a sync #1013

@LeviXIII

Description

@LeviXIII

Current Behaviour

If I write something like 1. New Items, if I save then it saves ok. But, if I sync, then the edited book name becomes "1".

Image

Acceptance Criteria

  • There needs to be a warning that let's users know that "." are not a welcome character to use and that dashes or underscores are.
  • We shouldn't let them save if there is a "." (or other special characters) in the name.
  • Syncing should be performed as normal and the given book name should be the same as before syncing

Test Checklist

Acceptance Criteria 1: Warning for invalid characters

  • Typing a . in the book name field surfaces a visible warning
  • Warning text mentions that . is not allowed
  • Warning text recommends using dashes (-) or underscores (_) as alternatives
  • Warning appears immediately on input (not only after save attempt)
  • Warning is dismissed/cleared once the . is removed

Acceptance Criteria 2: Save blocked when name contains a period

  • Save button is disabled (or save action is rejected) when name contains .
  • Attempting 1. New Items cannot be saved
  • Attempting names with . anywhere (start, middle, end, multiple dots) is blocked
  • Names without . save successfully (e.g. 1 New Items, 1-New-Items, 1_New_Items)

Acceptance Criteria 3: Sync preserves the book name

  • Save a valid edited book name (e.g. 1-New-Items) and run sync
  • After sync completes, the book name in the UI matches what was saved
  • After sync, the book name in metadata.json matches what was saved
  • Close and reopen the project — name persists exactly
  • Pull on another machine/clone — synced book name matches the original
  • Repeat with names containing dashes, underscores, numbers, and spaces

Regression checks

  • Existing books that previously had . in their names (if any) still load without errors
  • Default/unedited book names still sync correctly
  • Other editable fields are unaffected by the new validation
  • No console errors during edit → save → sync flow

Edge cases

  • Whitespace-only name still rejected as before
  • Empty name still rejected as before
  • Pasting a string containing . triggers the same warning and save block
  • Trying to bypass via rapid save/sync does not corrupt the name to 1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions