1
0
mirror of https://github.com/flarum/core.git synced 2025-06-06 22:55:11 +02:00

468 Commits

Author SHA1 Message Date
Sami Mazouz
aa33cfd1f8
fix(a11y): reply placeholder not accessible ()
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-04-16 21:13:32 +01:00
Sami Mazouz
dd868ab44e
fix: improve sessions user UI on mobile
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-12 13:21:21 +01:00
Sami Mazouz
28e3ccfde6
fix(qa): increase YIQ and fix menu item title
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2023-03-08 18:25:04 +01:00
Sami Mazouz
9342903d68
feat: access tokens user management UI ()
Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Co-authored-by: David <hi@davwheat.dev>
2023-02-21 14:14:53 +01:00
David Wheatley
408a92b4ea
feat: improved page navigation for users list ()
* feat: add first and last page buttons

* feat: add textbox-based page navigation

* feat: add query parameter page navigation
2023-02-21 13:04:30 +00:00
Robert Korulczyk
fee6ffe396
feat(seo): Do not use h3 header for poster author in posts stream ()
* Do not use h3 header for poster author in posts stream.

* Change back `.PostUser-name` tag to h3.
2023-02-15 18:44:58 +01:00
Daniël Klabbers
aa0b3288d5
feat(seo): shift h1 tag from logo to discussion title ()
* feat(seo): shift h1 tag from logo to discussion title

Many times have we seen opponents of using h2 as the discussion title. Although
my own SEO knowledge is limited, I have seen the importance of structuring pages
according to the content you wish to prioritize. If we only take that into consideration
there is zero reason for the app-wide identical logo to take precedence over any
other heading.

This change makes the logo a standard (visually identical) element, and
makes the discussion hero title a h1.

* feat(seo): rewrite remainder of hero titles and subtitles
2023-02-11 13:27:46 +01:00
ornanovitch
4d292263b5
fix(tags): tag text color contrast ()
* add yiq calculator util
* use the new contast util to differentiate light/dark tags
* fix: invert logic
* feat: add tag-dark and tag-light less config
* fix: convert 3 chars hex to 6 chars hex
* fix: rename import
* fix: clarify util name
* fix: rename function
* fix: invert less variables when dark mode is enabled
* fix: TagTiles contrast
* refactor: simplify logic with a unique variable
* refactor: simplify logic with a unique variable
* feat: add text color variables not depending on the dark/light mode
* refactor: use isDark rather than getContrast
* refactor: change getContrast to isDark with for a more direct approach
* fix: adjust snippet description
* refactor: change getContrast to isDark with for a more direct approach
* fix: adjust snippet description
* fix: TagHero contrast
* fix: DiscussionHero contrast
* fix: newDiscussion contrast
* fix(newDiscussion): restore less rule when tag is not colored
* fix: TagTiles description
* fix: TagTiles last posted
* chore: change `var` to `let`
* refactor: keep it for backwards compatibility
* refactor: keep it for backwards compatibility
* Apply suggestions from code review
* fix: missed this when I was resolving
* fix: remove dist files from pull request
* Revert "Resolved merge conflict"
This reverts commit c7f0d14aa8f2a18a5a0ae7530284e51d7aedd811, reversing
changes made to 6753dfc2af6a125f503724aed129bfd98fa06df5.
* fix: missed this when I was resolving
* fix
* Update isDark.ts
* chore: flexible contrast color fixing
* refactor(isDark): clarify the doc block
* fix(isDark): increase the yiq threshold
* typo
* fix: preserve design coloring through light and dark modes

Co-authored-by: David Wheatley <david@davwheat.dev>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2023-01-17 20:45:03 +01:00
Sami Mazouz
2d2bf5c504
fix: permissions table on mobile is unusable () 2023-01-14 19:34:12 +01:00
David Wheatley
fe5d543864
fix: post dropdown opens all dropdowns in .Post-actions () 2022-11-16 23:21:57 +00:00
ornanovitch
fccc3e2188
feat: contrast util with yiq calculator ()
* add yiq calculator util

* fix: convert 3 chars hex to 6 chars hex

* fix: clarify util name

* feat: add text color variables not depending on the dark/light mode

* refactor: change getContrast to isDark with for a more direct approach

* fix: adjust snippet description

* chore: change `var` to `let`

Co-authored-by: David Wheatley <david@davwheat.dev>
2022-11-07 11:20:02 +00:00
Ngô Quốc Đạt
d33f1abffc
fix: apply flex for AppearancePage colors input () 2022-10-01 20:18:03 +02:00
Sami Mazouz
8aec252452
fix(qa): simpler grid layout fix for overflow
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-08 20:52:33 +01:00
Sami Mazouz
32961d480c
fix(qa): grid layout causes overflowing of content
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-08 20:33:32 +01:00
Alexander Skvortsov
27e3d322ec
feat: increase margin between notifications list control icons ()
* feat: increase margin between notifications list control icons

This feels cleaner, and reduces the chances of a misclick.

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-06 12:28:09 +02:00
Sami Mazouz
9eab1085da
fix(regression): exiting long modal by clicking backdrop fails
Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-05 15:32:14 +01:00
Sami Mazouz
31f1ffd6a5
fix(regression): bad post actions alignment introduced in ()
* chore: merge media queries
* chore: change discussion page skeleton to grid layout
* chore: use grid areas instead of order

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
2022-09-03 13:30:44 +01:00
Ian Morland
4eb2112282
feat: Admin debug mode warning ()
* feat: Admin debug mode warning

* prettier

* Wrap in Alert component

* feat: add `title` and `icon` attributes to the `Alert` component

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* Update framework/core/js/src/admin/components/DebugWarningWidget.js

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* Update framework/core/locale/core.yml

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* prettier

* chore: convert to TS

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* Update framework/core/js/src/common/components/Alert.tsx

Co-authored-by: David Wheatley <hi@davwheat.dev>

* chore: add docs link

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>
Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>
2022-08-11 22:41:54 +02:00
Ian Morland
d02bf0faa1
feat: Delete all notifications ()
* Add delete all notifications option
* chore: `DELETE /api/notifications` as per conventions
* test: can delete all notifications

Co-authored-by: Sami Mazouz <ilyasmazouz@gmail.com>
2022-08-08 19:26:16 +01:00
Jasper Vriends
f69210b6d1
feat(modals): support stacking modals, remove bootstrap modals dependency ()
* Feature: Stackable modals

* Processed feedback

* fix: use position in modal stack rather than key for modal number

* fix: use correct base z-index

* chore: simplify `className` to `class`

* chore: add `key` attribute to ModalManager element

* fix: backdrop flashing as modals are stacked/unstacked

* chore: simplify modal close process

* docs: add TS overload to indicate deprecated modal opening syntax

Require explicit values for `attrs` and `stackModal` from Flarum 2.0, beginning deprecation from now.

* feat: use stackable modal for forgot password modal above sign in

* chore: explicitly check if modal is open before trying to focus trap

* fix(a11y): add missing  `aria-hidden` on main content when modal open

* fix(a11y): add missing `aria-modal` on modal

* chore: remove test code

* chore: remove dead CSS

* chore: remove overload

* fix: lock page scrolling when modal is open

* fix: strange scrolling behaviour

* chore: convert to JSX

* fix: event listener memory leak

* chore: remove unneeded optional chaining

* fix: incorrect return types

* chore: rewrite backdrop system - use one backdrop for all modals

* docs: typos in comment block

* fix: show backdrop directly below top-most modal

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>

* chore: format

* fix: use an invisible backdrop for each modal to exit

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* chore: remove debugging code

Signed-off-by: Sami Mazouz <ilyasmazouz@gmail.com>

* chore: remove forgotten debug code

Co-authored-by: David Wheatley <david@davwheat.dev>
Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
2022-08-08 13:29:14 +01:00
David Wheatley
61c4421bd2
fix: sticky nav content displays below post stream () 2022-08-02 10:40:51 +01:00
David Wheatley
7d67cfd1e7
fix: incorrect centring of deleted user avatars in notification list () 2022-07-28 17:15:29 +01:00
David Wheatley
7cafd9f51a
fix: titles positioned wrongly with custom header height () 2022-07-21 11:47:37 +01:00
David Wheatley
29179e27c6
feat: use position: sticky for discussion side nav () 2022-07-17 11:06:19 +01:00
David Wheatley
5721a2f487
fix: replace .fa() mixin usage with .fas() () 2022-07-15 23:16:49 +01:00
David Wheatley
b673d36f33
chore: split FA imports into separate Less file for easy overriding () 2022-07-15 09:42:02 +01:00
David Wheatley
7cd28710bc
fix: composer title positioning incorrect with custom header height () 2022-07-04 14:28:44 +01:00
David Sevilla Martin
709c5566bb
fix: overflow notifications group header text with ellipses ()
Fixes 
2022-07-04 12:16:59 +01:00
David Wheatley
36c296d787
fix(a11y: DiscussionListItem): controls dropdown not visible when tabbed into () 2022-06-20 03:52:54 +01:00
SychO9
903026a7e4 fix: Composer discussion title not visible with certain colors 2022-05-09 10:06:52 +02:00
David Sevilla Martin
904deda6b9 Replace ColorPreviewInput preview box with 'color' input () 2022-03-09 19:56:25 -05:00
David Wheatley
2a04f7e886 fix: overlap in minimized composer 2022-02-21 11:45:12 +01:00
David Wheatley
9c5dd28e8a fix: composer header overlap with controls 2022-02-21 11:45:12 +01:00
David Sevilla Martin
f418b84aca feat: remove color validation in appearance admin page & add color indicator ()
* Remove color validation in basics admin page & add color indicator

* Create ColorInput common component

* Revert 'formGroupAttrs' addition

* Rename component CSS classes

* Fix input type in ColorInput from AdminPage#buildSettingComponent

* Rename component to ColorPreviewInput, remove aliases in admin & export in compat

* Remove leftovers from rebase on master

* feat: add global type definition for a vnode element tag

* fix(a11y): add aria roles to color input

* chore: use new type

* chore: format

Co-authored-by: David Wheatley <hi@davwheat.dev>
2021-11-23 21:38:46 +00:00
David Wheatley
733ebff40c fix(a11y): show post action items when focus is within the post ()
* fix: show post action items when focus is within the post

* fix: add missing `&`
2021-11-21 20:25:00 +00:00
David Wheatley
697fcd7da0 fix(a11y): add focus traps to modals and nav drawer ()
* Add focus trap util

* Add focus trap to Modals

Fixes 

* Split tab press into `onTab` handler

* Remove deprecated code

* Use requestAnimationFrame instead of setTimeout

* Reduce code duplication

* Implement focus trap in nav drawer

Fixes 

* Hide drawer when window is resized to be bigger

Fixes issue where focus trap would remain on the drawer when it is
just the app header, if the drawer was opened then the window was
made larger.

* Simplify conditional function calls

* Fix modal focus trap

* Remove debug code

* Simplify resize handler conditional statements

* Add info about reasoning of resize handler

* Prefer native JS methods over jQuery

* Update conditional function call to handle `undefined`

* Expose screen sizes as CSS custom properties

* Use `window.matchMedia` rather than resize handler

* Fix spelling error

Co-authored-by: David Sevilla Martin <me@datitisev.me>

* Remove breaking change

Co-authored-by: David Sevilla Martin <me@datitisev.me>
2021-11-21 19:44:31 +00:00
Sami Mazouz
9a275e8e1b feat: Declare & Use CSS Custom Properties () 2021-11-04 22:34:18 +01:00
Sami Mazouz
47a800e724 chore: Minor Readme CSS code tidy up () 2021-10-29 19:31:15 +01:00
David Wheatley
a4499678d9 fix: issue with CSS styles when in-between whole pixel values for viewport width ()
* fix: issue with CSS styles when in-between whole pixel values for viewport width

Fixes 

* chore: add explanatory comment

* fix: add missing slash
2021-10-29 18:57:53 +01:00
Ian Morland
ddeaf37f49 Add README documentation to ExtensionPage ()
Co-authored-by: Alexander Skvortsov <sasha.skvortsov109@gmail.com>
2021-10-27 21:56:56 -04:00
David Wheatley
de27001f63 [A11Y] Improve accessibility for discussion reply count on post stream ()
* Add class to remove all UA styles from a button

* Improve classList utilisation

* Simplify JSX

* Use classlist instead of concatenation

* Fix reply count focusable when not acting as a button

* Add SR only class

* Add new reply count translations

* Use cleaner translations

* Remove unused import

* Add missing new line

* Delete Accessibility.less

* Use existing `.visually-hidden` class

* Format

* Fix locale formatting
2021-10-27 22:59:17 +02:00
Alexander Skvortsov
83014a5a9f Hide webkit search button () 2021-10-27 09:28:40 -04:00
Alexander Skvortsov
35986a050c Handle post rendering errors to avoid bricking ()
Whether it's due to corrupted content, missing tags, caching issues, or other assorted reasons, post content can't be rendered. Currently, this results in an exception that crashes the entire forum and is hard to debug. Instead, we should log the error and show an indicator message that rendering has failed.

Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
Co-authored-by: David Wheatley <hi@davwheat.dev>
2021-10-14 14:30:18 -04:00
David Wheatley
b099a3843d [A11Y] Accessibility improvements for the Search component ()
* Remove deprecated code

* Accessibility improvements for Search component
2021-09-20 16:06:15 +01:00
David Wheatley
44a80fc8fb [A11Y] Adds missing focus rings back to control elements ()
* Remove the stuff that removes critical accessibility features

* Remove no outline from basic blade layout

* Remove focus outline from FormControls
2021-09-13 23:47:13 +01:00
Sami Mazouz
637d403485 fix: Unable to use permission grid dropdowns due to z-index mistake ()
The one I had suggested here: https://github.com/flarum/core/pull/2887#pullrequestreview-690047538
2021-09-05 18:29:18 +01:00
Sami Mazouz
c3ab5b96bb feat: NoJs Admin View ()
Adds a nojs blade template to be able to enable/disable extensions when one of them misbehaves.
2021-08-31 09:08:27 +01:00
Sami Mazouz
857ebb7f3e CSS Code Housekeeping ()
* refactor: Avatar classes refactor
* refactor: Badge classes refactor
* chore: Remove commented dead code
* chore: Remove SignUpModal dead CSS code
Flarum seem to have had some kind of user display in the sign up modal 
on successful sign up, which no longer exists.

https://github.com/flarum/core/blob/v0.1.0-beta/js/forum/src/components/SignUpModal.js#L111
* chore: Deprecate unneeded vendor mixins
* chore: Normalize property values format
Co-authored-by: David Wheatley <hi@davwheat.dev>
* chore: Remove @-webkit-keyframes
* chore: Combine animation properties
* chore: Avoid `all` for transition
* chore: translate3d is no longer necessary for hardware acceleration
* fix: Lost cursor pointer to normalize update
* chore: Use CSS variables for more things
* chore: Remove unecessary overspecification
Co-authored-by: David Wheatley <hi@davwheat.dev>
2021-08-21 19:34:07 +01:00
David Wheatley
37a1383c2f [A11Y] Make checkboxes focusable ()
* Add extra feature to a11y focusring mixin

* Add visually hidden CSS class and mixin

* Visually hide checkboxes (keep in focus/a11y tree)

* Place checkbox focus ring around display element

* Improve mobile checkbox/switch accessibility
2021-08-16 11:56:10 +02:00
Sami Mazouz
ace08b4869 [1.x] Custom Colorising with CSS Custom Properties ()
* Start of conversion to CSS variables
* Use variable for Badge colors
* Use variable for avatar bg
* Use variable for user card bg
* Use css variables for hero
* Use css variables for buttons
* Use css variables for sidenav links
* Cleaner style attr

Co-authored-by: David Wheatley <hi@davwheat.dev>
2021-08-16 10:17:48 +01:00