2772 Commits

Author SHA1 Message Date
Dan Brown
213a86e3c0
Merge pull request #5415 from BookStackApp/more_lexical_fixes
Some checks failed
analyse-php / build (push) Waiting to run
lint-php / build (push) Waiting to run
test-migrations / build (8.2) (push) Waiting to run
test-migrations / build (8.3) (push) Waiting to run
test-migrations / build (8.4) (push) Waiting to run
test-php / build (8.2) (push) Waiting to run
test-php / build (8.3) (push) Waiting to run
test-php / build (8.4) (push) Waiting to run
test-js / build (push) Has been cancelled
Further Lexical Fixes
2025-02-16 15:28:55 +00:00
Dan Brown
2b746425c9
Lexical: Fixed code in lists, removed extra old alignment code
Code in lists could throw error on parse due to inner <code> tag being
parsed but not actually used within a <pre>, so this updates the
importDOM to disregard childdren for code blocks.

This also improves the invariant implementation to not be so
dev/debugger based, and to include vars in the output.
2025-02-16 15:09:33 +00:00
Dan Brown
2291d78382
Merge pull request #5470 from Silverlan/patch-1
Some checks failed
analyse-php / build (push) Has been cancelled
lint-js / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
Fix incorrect condition for displaying new books section
2025-02-12 18:14:28 +00:00
Dan Brown
b9306a9029
Sorting: Renamed sort set to sort rule
Renamed based on feedback from Tim and Script on Discord.
Also fixed flaky test
2025-02-11 14:36:25 +00:00
Dan Brown
a208c46b62
Sorting: Covered sort set management with tests 2025-02-10 17:19:49 +00:00
Dan Brown
ec79517493
Sorting: Added auto sort option to book sort UI
Includes indicator on books added to sort operation.
2025-02-09 15:16:18 +00:00
Dan Brown
ccd94684eb
Sorting: Improved sort set display, delete, added action on edit
- Changes to a sort set will now auto-apply to assinged books (basic
  chunck through all on save).
- Added book count indicator to sort set list items.
- Deletion now has confirmation and auto-handling of assigned
  books/settings.
2025-02-06 14:58:08 +00:00
Dan Brown
7093daa49d
Sorting: Connected up default sort setting for books 2025-02-05 14:33:46 +00:00
Dan Brown
b897af2ed0
Sorting: Finished main sort set CRUD work 2025-02-04 20:11:35 +00:00
Dan Brown
d28278bba6
Sorting: Added sort set form manager UI JS
Extracted much code to be shared with the shelf books management UI
2025-02-04 15:14:22 +00:00
Silverlan
12cc2f0689
Fix incorrect condition for displaying new books section 2025-02-03 19:01:08 +01:00
Dan Brown
bf8a84a8b1
Sorting: Started sort set routes and form 2025-02-03 16:48:57 +00:00
Dan Brown
a34023f715
Sorting: Added content misses from last commit, started settings 2025-01-30 17:49:19 +00:00
Dan Brown
5b0cb3dd50
Sorting: Extracted URL sort helper to own class
Was only used in one place, so didn't make sense to have extra global
helper clutter.
2025-01-29 17:02:34 +00:00
Dan Brown
7e03a973d8
Lexical: Ran a deeper check on translation use
Some checks failed
analyse-php / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
2025-01-27 16:40:41 +00:00
Dan Brown
d89a2fdb15
Lexical: Added media src conversions
Only actuall added YT in the end.
Google had changed URL scheme, and Vimeo seems to just be something else
now, can't really browse video pages like before.
2025-01-27 14:28:27 +00:00
Dan Brown
958b537a49
Lexical: Linked table form to have caption toggle option 2025-01-22 20:39:15 +00:00
Dan Brown
8a66365d48
Lexical: Added support for table caption nodes
Needs linking up to the table form still.
2025-01-22 12:54:13 +00:00
Dan Brown
04cca77ae6
Lexical: Added color picker/indicator to form fields
Some checks failed
test-js / build (push) Has been cancelled
2025-01-18 11:12:43 +00:00
Dan Brown
c091f67db3
Lexical: Added color format custom color select
Includes tracking of selected colors via localstorage for display.
2025-01-17 11:17:51 +00:00
Dan Brown
7f5fd16dc6
Lexical: Added some general test guidance
Just to help remember the general layout/methods that we've added to
make testing easier.
2025-01-15 14:31:09 +00:00
Dan Brown
0d1a237f81
Lexical: Fixed auto-link issue
Added extra test helper to check the editor state directly via string
notation access rather than juggling types/objects to access deep
properties.
2025-01-15 14:15:58 +00:00
Dan Brown
ff6c5aaecb
Markdown Editor: Fixed scroll jump on image upload
For #5384
2025-01-04 21:01:28 +00:00
Dan Brown
ebe2ca7faf
Lexical: Added about button/view
Some checks failed
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
analyse-php / build (push) Has been cancelled
lint-js / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
Re-used existing route and moved tinymce help to its own different
route. Added test to cover.
Added new external-content block to support in editor UI.
2024-12-17 22:40:28 +00:00
Dan Brown
f4005a139b
Lexical: Adjusted handling of child/sibling list items on nesting
Sibling/child items will now remain at the same visual level during
nesting/un-nested, so only the selected item level is visually altered.

Also added new model-based editor content matching system for tests.
2024-12-17 18:07:46 +00:00
Dan Brown
fca8f928a3
Lexical: Aligned new empty item behaviour for nested lists
Some checks are pending
test-js / build (push) Waiting to run
- Makes enter on empty nested list item un-nest instead of just creating
  new list items.
- Also updated existing lists tests to use newer helper setup.
2024-12-17 16:52:14 +00:00
Dan Brown
ace8af077d
Lexical: Improved list tab handling, Improved test utils
- Made tab work on empty list items
- Improved select preservation on single list item tab
- Altered test context creation for more standard testing
2024-12-17 14:44:10 +00:00
Dan Brown
e50cd33277
Lexical: Added testing for some added shortcuts
Some checks failed
test-js / build (push) Waiting to run
lint-js / build (push) Has been cancelled
Also:
- Added svg loading support (dummy stub) for jest.
- Updated headless test case due to node changes.
- Split out editor change detected to where appropriate.
- Added functions to help with testing, like mocking our context.
2024-12-16 16:27:44 +00:00
Dan Brown
8486775edf
Lexical: Added mulitple methods to escape details block
Enter on empty last line, or down on last empty line, will focus on the
next node after details, or created a new paragraph to focus on if
needed.
2024-12-16 14:30:06 +00:00
Dan Brown
5887322178
Lexical: Added details toolbar
Some checks are pending
test-js / build (push) Waiting to run
Includes unwrap and toggle open actions.
2024-12-15 18:13:49 +00:00
Dan Brown
3f86937f74
Lexical: Made summary part of details node
To provide more control of the summary as part of details.
To support, added a way to ignore elements during import DOM, allowing
up to read summaries when parsing details without duplicate nodes
involved.
2024-12-15 17:12:54 +00:00
Dan Brown
2f119d3033
Lexical: Adjusted modals and content area for mobile sizes
Some checks are pending
test-js / build (push) Waiting to run
2024-12-15 15:29:00 +00:00
Dan Brown
5f07f31c9f
Lexical: Added mobile toolbar support
Adds dynamic and fixed (out of DOM order) positioning with location
adjustment depending on space.
Also adds smarter hiding to prevent disappearing when mouse leaves but
within the same space as the toggle.
2024-12-15 14:03:08 +00:00
Dan Brown
a71aa241ad
Lexical: Added dark mode styles, fixed autolink range 2024-12-14 15:17:33 +00:00
Dan Brown
97b201f61f
Lexical: Added auto links on enter/space 2024-12-14 12:35:13 +00:00
Dan Brown
a8ef820443
Users: Hid lanuage preference for guest user
Some checks failed
analyse-php / build (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-migrations / build (8.4) (push) Has been cancelled
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
test-php / build (8.4) (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
Hiding since it's not really used, and may mislead on how to set default
app language (which should be done via env options).
Updated test to cover.

For #5356
2024-12-13 15:19:28 +00:00
Dan Brown
fcf0bf79a9
Attachments: Hid edit/delete controls where lacking permission
Some checks failed
analyse-php / build (push) Waiting to run
lint-php / build (push) Waiting to run
test-migrations / build (8.1) (push) Waiting to run
test-migrations / build (8.2) (push) Waiting to run
test-migrations / build (8.3) (push) Waiting to run
test-migrations / build (8.4) (push) Waiting to run
test-php / build (8.1) (push) Waiting to run
test-php / build (8.2) (push) Waiting to run
test-php / build (8.3) (push) Waiting to run
test-php / build (8.4) (push) Waiting to run
lint-js / build (push) Has been cancelled
test-js / build (push) Has been cancelled
Added test to cover.
Also migrated related ajax-delete-row component to ts.

For #5323
2024-12-11 20:38:30 +00:00
Dan Brown
8ec26e8083
SASS: Updated to use modules and address deprecations
Some checks failed
analyse-php / build (push) Has been cancelled
lint-js / build (push) Has been cancelled
lint-php / build (push) Has been cancelled
test-js / build (push) Has been cancelled
test-migrations / build (8.1) (push) Has been cancelled
test-migrations / build (8.2) (push) Has been cancelled
test-migrations / build (8.3) (push) Has been cancelled
test-php / build (8.1) (push) Has been cancelled
test-php / build (8.2) (push) Has been cancelled
test-php / build (8.3) (push) Has been cancelled
Changes the name of our spacing variables due to the prefixing -/_
meaning private in the use of new "use" rather than include.

All now modular too, so all variables/mixins are accessed via their
package.

Also renamed variables file to vars for simpler/cleaner access/writing.

eg. '$-m' is now 'vars.$m'
2024-12-09 13:25:35 +00:00
Dan Brown
617b2edea0
JS: Updated packages, fixed lint issue
Left eslint as old due to eslint-config-airbnb-base not yet being
comptible.
Some SASS deprecations to solve.
2024-12-09 13:07:39 +00:00
Dan Brown
d00cf6e1ba
Lexical: Updated tests for node changes 2024-12-04 20:03:05 +00:00
Dan Brown
9fdd100f2d
Lexical: Reorganised custom node code into lexical codebase
Also cleaned up old unused imports.
2024-12-04 18:53:59 +00:00
Dan Brown
57d8449660
Lexical: Merged custom table node code 2024-12-03 20:08:33 +00:00
Dan Brown
ebd4604f21
Lexical: Merged list nodes 2024-12-03 19:03:52 +00:00
Dan Brown
36a4d79120
Lexical: Extracted & merged heading & quote nodes 2024-12-03 17:04:50 +00:00
Dan Brown
f3fa63a5ae
Lexical: Merged custom paragraph node, removed old format/indent refs
Start of work to merge custom nodes into lexical, removing old unused
format/indent core logic while extending common block elements where
possible.
2024-12-03 16:24:49 +00:00
Dan Brown
fdbbcf2b8a
Merge branch 'portazips' into development
Some checks failed
analyse-php / build (push) Waiting to run
lint-php / build (push) Waiting to run
test-migrations / build (8.1) (push) Waiting to run
test-migrations / build (8.2) (push) Waiting to run
test-migrations / build (8.3) (push) Waiting to run
test-php / build (8.1) (push) Waiting to run
test-php / build (8.2) (push) Waiting to run
test-php / build (8.3) (push) Waiting to run
lint-js / build (push) Has been cancelled
test-js / build (push) Has been cancelled
2024-12-01 13:06:43 +00:00
Dan Brown
0a07b0d162
Merge pull request #5259 from BookStackApp/typescript-conversions
Conversion of Services to TypeScript
2024-12-01 13:04:59 +00:00
Dan Brown
4630f07282
Code: Set base codemirror line height
Prevents difference in line height between light/dark mode.
For #5146
2024-11-29 12:57:53 +00:00
Dan Brown
95d62e7f57
ZIP Imports/Exports: Fixed some lint and test issues
Some checks failed
analyse-php / build (push) Waiting to run
lint-php / build (push) Waiting to run
test-migrations / build (8.1) (push) Waiting to run
test-migrations / build (8.2) (push) Waiting to run
test-migrations / build (8.3) (push) Waiting to run
test-php / build (8.1) (push) Waiting to run
test-php / build (8.2) (push) Waiting to run
test-php / build (8.3) (push) Waiting to run
lint-js / build (push) Has been cancelled
test-js / build (push) Has been cancelled
- Updated test handling to create imports folder when required.
- Updated some tests to delete created import zip files.
2024-11-25 16:30:56 +00:00
Dan Brown
f79c6aef8d
ZIP Imports: Updated import form to show loading indicator
Some checks are pending
analyse-php / build (push) Waiting to run
lint-js / build (push) Waiting to run
lint-php / build (push) Waiting to run
test-js / build (push) Waiting to run
test-migrations / build (8.1) (push) Waiting to run
test-migrations / build (8.2) (push) Waiting to run
test-migrations / build (8.3) (push) Waiting to run
test-php / build (8.1) (push) Waiting to run
test-php / build (8.2) (push) Waiting to run
test-php / build (8.3) (push) Waiting to run
And disable button after submit.
Added here because the import could take some time, so it's best to show
an indicator to the user to show that something is happening, and help
prevent duplicate submission or re-submit attempts.
2024-11-22 21:36:42 +00:00