Commit graph

136 commits

Author SHA1 Message Date
Joachim
71390f1735 Set body height 2021-04-15 21:51:14 +02:00
Fabien Basmaison
e016006ade [css] Rename all classes consistently: :shamed:
This commit addresses https://github.com/mouse-reeve/bookwyrm/pull/883#pullrequestreview-632930445.
2021-04-10 19:51:18 +02: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
be0cabc415 [css] Improve quotes. 2021-04-07 18:07:32 +02:00
Fabien Basmaison
2a0924027b [css] Use more visible comments to split blocks. 2021-04-07 17:33:28 +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
f2a2b410a1 [assets] Add comment to mention replacing font icons with SVG. 2021-04-07 10:49:52 +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
964b47ea97 [assets] Fix path for icomoon font. 2021-04-05 16:46:30 +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
Mouse Reeve
abd6a78295
Merge pull request #862 from mouse-reeve/disabled-link
Valid html solution to disabling pagination links
2021-04-04 10:59:22 -07:00
Fabien Basmaison
485b0fa0f3 Simplify rating form:
- Create a snippet to regroup similar code.
- Reduce and document tricky logic of CSS.
- Add i18n strings.
2021-04-04 15:08:42 +02:00
Mouse Reeve
8d7527dee3 CSS linter fixes 2021-04-03 11:59:14 -07:00
Mouse Reeve
3cb91098e6 Valid html solution to disabling pagination links 2021-04-03 11:54:15 -07:00
Mouse Reeve
7483cb5919 Adds getting started find books view 2021-03-31 13:56:26 -07: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
Fabien Basmaison
cc01105bf0 Add linter for CSS files:
- Add Github Action.
- Update .gitignore.
- Add .stylelintignore for vendor related files.
- Fix format.css to match rules (includes hacks with @todo).
2021-03-31 16:17:05 +02:00
Mouse Reeve
0ef33d2acb Adds shared books as a metric for recommending follows 2021-03-27 07:36:14 -07:00
Mouse Reeve
b0e1095fe6 Adds "suggested follows" panel 2021-03-26 10:32:42 -07:00
Mouse Reeve
8d5630e059 Adds css transitions to notification and unread statuses 2021-03-23 17:52:58 -07:00
Mouse Reeve
b8cd1d5bce Show unread status reload link 2021-03-23 12:52:38 -07:00
Mouse Reeve
d8a20175b6 Adds email template layout and formatting 2021-03-21 12:06:12 -07:00
Mouse Reeve
dd15e87073 Merge branch 'main' into progress-update-ui 2021-03-20 17:38:22 -07:00
Mouse Reeve
942c4a6664 Move progress updates into modal 2021-03-20 17:18:18 -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
Fabien Basmaison
b9a61162d7 Merge branch 'main' into ci 2021-03-20 15:26:51 +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
a52fee4ccf Remove (potentially useful) unused CSS. 2021-03-06 21:18:39 +01:00