Mouse Reeve
b0e7a5e468
Post statuses asynchronously
2021-09-08 19:30:45 -07:00
Mouse Reeve
c007f44030
Linter's have demands
2021-09-08 17:54:50 -07:00
Mouse Reeve
03b608565d
Save status drafts in localstorage
2021-09-08 13:58:10 -07:00
Mouse Reeve
8b5ac6b012
Javascript linter
2021-08-17 09:28:39 -07:00
Mouse Reeve
3026a86b11
Refines preventDefault logic
2021-08-17 09:21:57 -07:00
Mouse Reeve
2f93017eaa
Fixes event propogation
2021-08-17 08:45:10 -07:00
Mouse Reeve
011175a6e3
Appeases js linter
2021-08-16 12:44:36 -07:00
Mouse Reeve
e6b785d731
No-update mode for "want to read"
2021-08-16 12:28:04 -07:00
Mouse Reeve
21a954c7df
Always use underscores in html ids
...
Plus some other shifting around
2021-08-08 19:44:12 -07:00
Mouse Reeve
e65bc09e7a
Linter fixes
2021-06-08 12:42:45 -07:00
Mouse Reeve
eb12506985
No script fallback mode
2021-06-08 12:40:01 -07:00
Jason Kelly
7eb5f3b026
Making magic number more readable
2021-05-23 14:31:22 +08:00
Jason Kelly
6e655cb0e0
Added new widget to alert if a file is set at larger than 10 MB.
...
- Updated default widget to use template that adds a notification box.
- Added JS to add onchange & load events to look at the value in the input and trigger the notification & disable the form submits.
2021-05-23 14:12:00 +08:00
Mouse Reeve
454dd25681
Only make notification count red for mentions
2021-04-30 07:49:34 -07:00
Fabien Basmaison
b92ff9752d
[assets] Remove UI and behaviours for interactions:
...
This commit addresses https://github.com/mouse-reeve/bookwyrm/pull/883#discussion_r609739553 .
2021-04-08 17:37:29 +02:00
Fabien Basmaison
2f90b4ce66
[assets] Fix broken actions for focus and checkbox:
...
This commit should address the following two comments:
- https://github.com/mouse-reeve/bookwyrm/pull/883#discussion_r609172258
- https://github.com/mouse-reeve/bookwyrm/pull/883#discussion_r609174513
2021-04-08 11:37:14 +02:00
Fabien Basmaison
83bd417878
[assets] Update interactions code:
...
This commit should address https://github.com/mouse-reeve/bookwyrm/pull/883#discussion_r609381969 .
- Disable the button being used to submit the form.
- Rename variables based on @mouse-reeve’s explanations. Thanks! ✨
2021-04-08 11:08:13 +02:00
Fabien Basmaison
f77088b964
[assets] Remove redundant class already provided by bulma:
...
Replace all classes `hidden` with `is-hidden` in templates, CSS and JS.
2021-04-07 17:31:00 +02:00
Fabien Basmaison
54805afb51
[assets] Tweak JSDoc.
2021-04-07 10:37:11 +02:00
Fabien Basmaison
5d569e8926
[assets] Only update status if the promise is successful:
...
- Use promises in `ajaxPost` and `interact`.
- Add some animations in CSS.
2021-04-07 09:24:34 +02:00
Fabien Basmaison
1c05107f2b
[assets] Tweak comments.
2021-04-07 07:53:30 +02:00
Fabien Basmaison
44040201f9
[assets] Move interact function.
2021-04-06 17:57:39 +02:00
Fabien Basmaison
9d95f54aa2
[assets] Refactor toggleAction
and toggleMenu
a bit.
2021-04-06 17:48:56 +02:00
Fabien Basmaison
52d2f0e331
[assets] Document functions and variables:
...
- Use expressive names for variables.
- Add docblocks for each function.
- Add ESLint rules for comments.
2021-04-06 16:17:20 +02:00
Fabien Basmaison
5d3d00f694
[assets] Use dataset
+ use expressive names for some variables.
2021-04-06 15:36:34 +02:00
Fabien Basmaison
62fe2ef600
[assets] Replace inline events with addEventListener
; this breaks sliding menu.
2021-04-06 11:37:23 +02:00
Fabien Basmaison
7e49b3cb26
[assets] Simplify addRemoveClass function.
2021-04-06 11:19:44 +02:00
Fabien Basmaison
70c652d565
[assets] Add rules to ESLint:
...
- Fix long line.
- Enforce a few stylistic habits:
- Avoid some potential dangerous constructs.
- `arrow-spacing`: Use at least one space around arrows.
- `keyword-spacing`: Use at least one space around keywords (if, else, for…).
- `no-multiple-empty-lines`: Only use one empty line between code.
- `no-var`: Use `let` or `const` instead of `var`:
- `padded-blocks`: Do not pad blocks.
- `padding-line-between-statements`: Use empty lines between some statements.
- `space-before-blocks`: Use at least one space before the opening brace of a block.
2021-04-06 10:42:52 +02:00
Fabien Basmaison
991d897ac7
[assets] Listen to events as soon as possible.
2021-04-06 09:57:52 +02:00
Fabien Basmaison
2f2f7db086
[assets] Use classes for JS files:
...
- Classes strictly parse code implicitly.
- Fix previously updated code.
2021-04-06 09:44:59 +02:00
Fabien Basmaison
f430363be0
[assets] Simplify a function expression.
2021-04-06 09:11:56 +02:00
Fabien Basmaison
f6c3e581b9
[assets] Replace Array.from(document.getElementsByClassName(…))
by querySelectorAll(…)
.
2021-04-06 09:11:27 +02:00
Fabien Basmaison
6b0a3ce4b1
[assets] Move localStorage chunks of code to their own file:
...
This should prevent a sync issue with updateDisplay not always being loaded on time.
2021-04-06 09:06:51 +02:00
Fabien Basmaison
cbed5e331b
[assets] Move some frontend assets to _vendor_ directories:
...
This simplifies linting of files we have no grasp on, and clarifies responsibilities.
- Add .eslintignore.
- Restrict linting to bookwyrm/static.
2021-04-05 16:17:11 +02:00
Fabien Basmaison
5aea7343b4
[assets] Rename some files for consistency.
2021-04-05 16:16:48 +02:00
Fabien Basmaison
6971c9b133
[assets] Move toggleAllCheckboxes code to its own file.
2021-04-05 16:16:05 +02:00
Fabien Basmaison
53f03457cc
Add linter for JS files with basic recommended rules:
...
- Add Github Action.
- Fix JS files to match rules; mostly `globals` and `exported`.
2021-03-31 17:07:28 +02:00
Mouse Reeve
b8cd1d5bce
Show unread status reload link
2021-03-23 12:52:38 -07:00
Fabien Basmaison
fa79070b59
[lint] Update editorconfig linting:
...
- Add settings for comments.
- Remove custom settings that don’t work.
- Fix vendor JS file:
2021-03-20 16:33:18 +01:00
Mouse Reeve
c31bf1f0c8
Fixes loading javascript listeners
2021-03-19 15:59:28 -07:00
Mouse Reeve
5ad645c225
Move check all js into separate file
2021-03-19 10:51:45 -07:00
Mouse Reeve
443daab128
Move tabs javascript into separate file
2021-03-19 10:47:32 -07:00
Mouse Reeve
baee0796cd
Moves localstorage handlers into its own file
2021-03-18 09:02:07 -07:00
Mouse Reeve
091ad53061
JS linting and whitespace fixes
2021-03-13 12:14:34 -08:00
Fabien Basmaison
097b8e5811
Fix toggling all checkboxes of failed imports:
...
- Rename classes and function to something more descriptive.
- Listen to the element checked status instead of a click on a non‑focusable element.
- Use specific DOM targets instead of relying on the DOM ancestor tree.
- Add a skip‑link to the end of the list and avoid tabbing through all failed items.
- Update related i18n strings in French.
- Avoid having the label on the whole width to prevent accidental click.
- Move `fieldset` out of `ul`.
2021-03-05 15:41:21 +01:00
Ned Zimmerman
263b13f157
Adapt tab handler to vanilla JS, fix focus jump, improve accessible naming of tabs/panels
2021-02-28 14:04:04 -04:00
Ned Zimmerman
bc7f830b2b
Merge branch 'upstream' into tab-keyboard-accessibility
2021-02-27 11:53:27 -04:00
Ned Zimmerman
9580bec154
feat: modify tabbed interfaces to support keyboard accessibility ( fixes #526 )
2021-02-27 11:47:03 -04:00
Mouse Reeve
76491e4e35
Back off notification polling
2021-02-09 10:38:43 -08:00
Mouse Reeve
b53ef73faf
Feed templates
2021-01-29 10:25:31 -08:00