Commit Graph

19 Commits

Author SHA1 Message Date
ChunkyProgrammer 73be336bc3
Allow filtering searches by features (#5125)
* Allow filtering searches by features

* use include instead of some

* use created instead of mounted for ft-radio-button and ft-checkbox-list

Co-Authored-By: absidue <48293849+absidue@users.noreply.github.com>

* update css and classes used in ft-checkbox-list

* small bug fixes

* Remove unused prop

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2024-05-27 09:15:31 +08:00
Jason 4bb53f780c
Improve search filter & modal accessibility (#3975)
* Add title and aria-pressed attributes to filter button

* Add radio button hover and focus styling with accent-color

* Programmatically apply focus after clicking to open filter

* Implement filter-button-visible icon styling

* Use more standard means to grab grandchild ref

* Make search filters heading not selectable

* Additional icon and radio button styling updates

* Implement modal focus management with portal-vue

For the importance of modal focus management, see: https://accessibility.huit.harvard.edu/technique-accessible-modal-dialogs

* Add themes for handling ft-prompt styling

This is a portal-compatible way of affecting prompt styling, as ':deep' does not work for portals.

* Require title in ft-prompt to ensure accessible properties are functional

* Set initial radio button value on load

* Update App.vue

* Fix z-index and modal error issue

* Remove unnecessary additionl focus restoration logic in add-video-prompt
2024-05-01 08:38:32 +08:00
ChunkyProgrammer 2bc44cd66b
Define emits before using them (#4973)
Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
2024-04-17 21:50:23 +00:00
Jason 23f1618fcb
Add back 3 Stylelint configs (#4350)
* Add back @double-great/stylelint-a11y Stylelint plugin

Notably, we choose to not use the 'a11y/no-outline-none' rule. The reason for this being that our focus ring suffices for almost every use case (https://www.w3.org/WAI/WCAG22/Understanding/focus-appearance-minimum), and using the same hover and focus styling can be considered bad design in many cases. YT goes the direction of foregoing the focus ring for many of its components and choosing a barely darker color than its :hover for :focus styling, which is controversial. Accessibility-wise, at the very least, using the same hover and focus styling can be confusing, especially for sighted users who use keyboard navigation.

* Add back stylelint-config-sass-guidelines

* Add back stylelint-config-standard

* Satisfy media-prefers-reduced-motion a11y rule

This is not recognized as a fix by the rule due to its limited detection logic, so this rule is not being imported directly.

* Remove duplicate code

* Implement linting fixes

* Implement _ft-list-item.scss linting fixes excluding no-descending-specificity

Properly implementing the no-descending-specificity rule in this file seems to utterly destroy the styling. This would be its own entire initiative to unravel.

* Restart from scratch modifications of _ft-list-item.scss

* Resolve styling discrepancies introduced with ft-list-channel and ft-tooltip
2024-04-17 19:49:37 +02:00
Jason 3db6f437c9
Implement Stylelint linting of CSS logical properties (#4023)
* Add Stylelint plugin and rule for evaluating use of logical properties

* Implement stylelint-advised use of logical properties in SCSS files

* Implement stylelint-advised use of logical properties in CSS files

* Implement stylelint linting before each commit to any branch of the repo

* Remove other Stylelint plugins so that we can add them in later one-by-one

After discussing this with the FreeTube team, it seems that we are still undecided on which rules we want to be active, including ones currently enabled. As a stopgap fix, we disabled Stylelint checking in our pre-commit Git hook and our recommended
> freetube@0.19.0 lint-fix
> run-p eslint-fix lint-style-fix command. With this change, we will be using Stylelint in our
> freetube@0.19.0 lint-fix
> run-p eslint-fix lint-style-fix command, while giving us the flexibility to add in additional desired plugins and rules as separate efforts.

* Add video player to .stylelintignore

* Replace non-logical property usage in templates

This is not enforced by the plugin at this time.

* Remove use of logical properties from ft-video-player, & allow empty input when .stylelintignore files are changed

* Update ft-video-player.css to disable use of logical property linter

We want to avoid introducing directionality-specific properties that could muck up the video player.

* Remove redundant/unnecessary scripts in package.json
2023-09-14 08:22:33 +08:00
Jason 6f2a535212
Implement right-to-left interface (#3970)
* Replace margin-left with margin-inline-start

* Replace margin-right with margin-inline-end

* Replace padding-left with padding-inline-start

* Replace padding-right with padding-inline-end

* Replace padding-top & padding-bottom with padding-block; continue replacing  padding-left and padding-right with padding-inline-start and padding-inline-end

* Add updated rtl-compatible margins to ft-slider and fix indentation

* Replace margin-top & margin-bottom with margin-block; continue replacing margin-left and margin-right with margin-inline-start and margin-inline-end

* Continue replacing with margin-block and margin-inline

* Replace left and right with inset-inline-start and inset-inline-end

This commit also changes border-left to border-inline-start, and border-right to border-inline-end.

* Replace margin-bottom, top, and bottom with margin-block-end, inset-block-start, and inset-block-end

This commit also replaces border-top and border-bottom with border-block-start and border-block-end.

* Replace text-align left and right with text-align start and end

* Fix syntax error with inset-block-end

* Implement dynamic float: left/right based on direction ltr/rtl

* Implement dynamic navigation arrow placement based on direction ltr/rtl

To the fullest of my understanding, it is expected for the left navigation in rtl-supporting browsers to be for forward navigation, and the right one to be for backward navigation.

* Add direction to body based on preferred language

* Implement horizontal directionality coefficient to fix translate working in wrong x-direction for rtl languages

* Add explicit text-align: start in places to ensure rtl version is correctly aligned

* Add text-align: start to places where it is not inferred to enable proper rtl text orientation

* Fix search bar magnifying glass being too far right issue

* Move body.dir-setting logic to setLocale to fix dir not setting correctly on page reload

* Change .switchColumn to have align-items: start instead of justify-items: start

I have validated this for all settings tabs; the justify-content: start did nothing in any language, left-to-right or right-to-left. Replacing it with align-items: start aligned all menu switch items by their switches, not by their labels. This makes for a much more uniform settings section for trl languages.

* Fix emergent bug in which history icons are temporarily disabled on changing language to one with different directionality

Given that which icon is displayed for which history arrow is now dynamic based on the user's directionality, changing of the icon resets the font-awesome-icon state and thus re-adds the base disabled class to both arrows. This means that changing your language to one that has a different directionality was falsely setting the arrows to their disabled state (until the route is changed, after which the history icons will be fully back to normal). This commmit refactors the history icon setting logic to use class binding to two booleans in the top-nav component's data rather than adding and removing the disabled classes directly to the arrow elements' classLists, thus cleaning up the implementation and fixing the bug.

* Add Kurdish to rtl languages list & add li items to be right-aligned on rtl languages

* Force FreeTube logo to be ordered left-to-right for 'brand consistency'

* Add styling flipping font-awesome icons for rtl languages except for exclusion list

* Update isRightAligned with additional languages, and use it instead of locale value from store

Kudos to absidue for pointing out this existing function for representing this, and that it grabs directly from the i18n object. This means that FreeTube will display the proper rtl interface if one is the user's system language, where it did not before.

* Update isRightAligned property name to more clearly reflect rtl purpose

* Simplify left/right arrow display logic

Leverage the icons being flipped rather than manually setting the classes to their opposites when the directionality is RTL.

* Replace justify-self: left & justify-self: right with justify-self; start and justify-self: end

* Remove misguided attempt to emulate directionality-agnosticism with rightAligned class

* Explicitly center FreeTube version on About page

* Replace pre-existing identation issue

* Replace margin-left with margin-inline-start

* Replace margin-right with margin-inline-end

* Replace padding-left with padding-inline-start

* Replace padding-right with padding-inline-end

* Replace padding-top & padding-bottom with padding-block; continue replacing  padding-left and padding-right with padding-inline-start and padding-inline-end

* Add updated rtl-compatible margins to ft-slider and fix indentation

* Replace margin-top & margin-bottom with margin-block; continue replacing margin-left and margin-right with margin-inline-start and margin-inline-end

* Continue replacing with margin-block and margin-inline

* Replace left and right with inset-inline-start and inset-inline-end

This commit also changes border-left to border-inline-start, and border-right to border-inline-end.

* Replace margin-bottom, top, and bottom with margin-block-end, inset-block-start, and inset-block-end

This commit also replaces border-top and border-bottom with border-block-start and border-block-end.

* Replace text-align left and right with text-align start and end

* Fix syntax error with inset-block-end

* Implement dynamic float: left/right based on direction ltr/rtl

* Implement dynamic navigation arrow placement based on direction ltr/rtl

To the fullest of my understanding, it is expected for the left navigation in rtl-supporting browsers to be for forward navigation, and the right one to be for backward navigation.

* Add direction to body based on preferred language

* Implement horizontal directionality coefficient to fix translate working in wrong x-direction for rtl languages

* Add explicit text-align: start in places to ensure rtl version is correctly aligned

* Add text-align: start to places where it is not inferred to enable proper rtl text orientation

* Fix search bar magnifying glass being too far right issue

* Move body.dir-setting logic to setLocale to fix dir not setting correctly on page reload

* Change .switchColumn to have align-items: start instead of justify-items: start

I have validated this for all settings tabs; the justify-content: start did nothing in any language, left-to-right or right-to-left. Replacing it with align-items: start aligned all menu switch items by their switches, not by their labels. This makes for a much more uniform settings section for trl languages.

* Fix emergent bug in which history icons are temporarily disabled on changing language to one with different directionality

Given that which icon is displayed for which history arrow is now dynamic based on the user's directionality, changing of the icon resets the font-awesome-icon state and thus re-adds the base disabled class to both arrows. This means that changing your language to one that has a different directionality was falsely setting the arrows to their disabled state (until the route is changed, after which the history icons will be fully back to normal). This commmit refactors the history icon setting logic to use class binding to two booleans in the top-nav component's data rather than adding and removing the disabled classes directly to the arrow elements' classLists, thus cleaning up the implementation and fixing the bug.

* Add Kurdish to rtl languages list & add li items to be right-aligned on rtl languages

* Force FreeTube logo to be ordered left-to-right for 'brand consistency'

* Add styling flipping font-awesome icons for rtl languages except for exclusion list

* Update isRightAligned with additional languages, and use it instead of locale value from store

Kudos to absidue for pointing out this existing function for representing this, and that it grabs directly from the i18n object. This means that FreeTube will display the proper rtl interface if one is the user's system language, where it did not before.

* Update isRightAligned property name to more clearly reflect rtl purpose

* Simplify left/right arrow display logic

Leverage the icons being flipped rather than manually setting the classes to their opposites when the directionality is RTL.

* Replace justify-self: left & justify-self: right with justify-self; start and justify-self: end

* Remove misguided attempt to emulate directionality-agnosticism with rightAligned class

* Explicitly center FreeTube version on About page

* Fix question mark reversing logic for Arabic, Hebrew, Persian, and Urdu

* Fix minor indentation issue

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* Remove unused function

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>

* Update src/renderer/components/ft-slider/ft-slider.css

Co-authored-by: PikachuEXE <pikachuexe@gmail.com>

---------

Co-authored-by: absidue <48293849+absidue@users.noreply.github.com>
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
2023-09-09 18:29:26 +02:00
ChunkyProgrammer b360f483d7
add missing search filters (#3141)
* add missing search filters

* allow sort by to be used on all types again

* fix local api filter duration
2023-02-01 20:43:04 +00:00
absidue 2cd8f0f2d3
Switch from Vue.extend to defineComponent (#3066) 2023-01-18 08:50:02 +01:00
PikachuEXE 6d2b1f3632
Top-Nav: Improve search filter's appearance (#1360)
* Update search filter style to have little transparency & smaller size
2021-06-15 14:53:06 +00:00
PikachuEXE 3bce276564
Implement search filter changed indicator (#1257)
* ! Fix app unable to load due to missing `getLocale` in `mapActions`

* Implement search filter changed indicator
2021-05-25 19:54:27 +02:00
Preston e1266ec675 Fix search filter prevention 2020-12-22 13:39:19 -05:00
Preston 49ef1e2047 Fix linter issues and update ytdl-core 2020-12-18 09:59:12 -05:00
Preston ea03dee245 Prevent certain search filter combinations from being used 2020-12-17 13:55:47 -05:00
milotype 7c6fbc057b
Alignment and typography corrections (#653)
* Update player-settings.vue

Replaced the LATIN SMALL LETTER X with the correct MULTIPLICATION SIGN

* Update ft-slider.js

Added a SPACE character as separator between "value" and "extension".

* Update ft-slider.vue

Changed the "SPACE" and "HYPHEN" characters with the "COLON" character, in order to prevent values to look like they where negative.

* Update ft-search-filters.vue

- Removed CSS class "radioMargin" for "Time" and "Type". This class does not seem to be defined anywhere!
- Substituted CSS class "radioMargin" with "searchRadio" for "Duration", so the div aligns correctly.

* Update ft-slider.js

Removed SPACE character between "currentValue" and "valueExtension"
2020-10-14 11:12:58 -04:00
Preston 602a140361 Fix Locale issues and add Privacy Settings card to settings page 2020-08-22 16:51:04 -04:00
Preston 6a2e301d37 Fix locale issues 2020-08-22 14:26:47 -04:00
Preston 898e513974 Make some progress on incorporating the locale file into the app 2020-08-06 20:20:42 -04:00
Preston 2533161667 Start on Mobile view and add Web Build option 2020-03-24 09:22:29 -04:00
Preston ded6534d16 Push Latest Code to Repository 2020-02-16 13:30:00 -05:00