From 009fee7954b198e06813a9101c13b316e6a31c35 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Thu, 5 Jan 2023 21:32:02 +0900 Subject: Remove object-fit polyfill for the old Microsoft Edge Port d68c12648c2d11d4f172e740a2d9067a38f8faca to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/extra_polyfills.js | 3 --- app/javascript/flavours/glitch/load_polyfills.js | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/extra_polyfills.js b/app/javascript/flavours/glitch/extra_polyfills.js index 0d45c23b0..6e8004f07 100644 --- a/app/javascript/flavours/glitch/extra_polyfills.js +++ b/app/javascript/flavours/glitch/extra_polyfills.js @@ -1,6 +1,3 @@ import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'; import 'intersection-observer'; import 'requestidlecallback'; -import objectFitImages from 'object-fit-images'; - -objectFitImages(); diff --git a/app/javascript/flavours/glitch/load_polyfills.js b/app/javascript/flavours/glitch/load_polyfills.js index cc5bcd18f..f5a897f75 100644 --- a/app/javascript/flavours/glitch/load_polyfills.js +++ b/app/javascript/flavours/glitch/load_polyfills.js @@ -23,15 +23,14 @@ function loadPolyfills() { ); // Latest version of Firefox and Safari do not have IntersectionObserver. - // Edge does not have requestIdleCallback and object-fit CSS property. + // Edge does not have requestIdleCallback. // This avoids shipping them all the polyfills. const needsExtraPolyfills = !( window.AbortController && window.IntersectionObserver && window.IntersectionObserverEntry && 'isIntersecting' in IntersectionObserverEntry.prototype && - window.requestIdleCallback && - 'object-fit' in (new Image()).style + window.requestIdleCallback ); return Promise.all([ -- cgit From 1702907a9d26a8e3aa5e4567487cb21ee3fc2a8c Mon Sep 17 00:00:00 2001 From: Jed Fox Date: Thu, 5 Jan 2023 07:34:10 -0500 Subject: [Glitch] Improve the contrast of the chart in “poll has ended” notifications MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port b81b646e3bf94ebc1b86999250092e947d7bc5dc to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/polls.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/polls.scss b/app/javascript/flavours/glitch/styles/polls.scss index 0847c8f4c..43924829d 100644 --- a/app/javascript/flavours/glitch/styles/polls.scss +++ b/app/javascript/flavours/glitch/styles/polls.scss @@ -289,10 +289,10 @@ color: $dark-text-color; &__chart { - background: rgba(darken($ui-primary-color, 14%), 0.2); + background: rgba(darken($ui-primary-color, 14%), 0.7); &.leading { - background: rgba($ui-highlight-color, 0.2); + background: rgba($ui-highlight-color, 0.5); } } } -- cgit From 4f335da8f88fccf4285023208664bd8594a1deb9 Mon Sep 17 00:00:00 2001 From: Holden Foreman <38192823+hs4man21@users.noreply.github.com> Date: Thu, 5 Jan 2023 07:36:42 -0500 Subject: [Glitch] Add aria-hidden to 'Hide image' button in MediaGallery since the button is useless to screen reader users Port c5da2f8c439f86f809d750b42aa11cdeef6b7c1f to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/icon_button.js | 4 ++++ app/javascript/flavours/glitch/components/media_gallery.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/components/icon_button.js b/app/javascript/flavours/glitch/components/icon_button.js index 41a95e92f..2485f0f48 100644 --- a/app/javascript/flavours/glitch/components/icon_button.js +++ b/app/javascript/flavours/glitch/components/icon_button.js @@ -30,6 +30,7 @@ export default class IconButton extends React.PureComponent { counter: PropTypes.number, obfuscateCount: PropTypes.bool, href: PropTypes.string, + ariaHidden: PropTypes.bool, }; static defaultProps = { @@ -39,6 +40,7 @@ export default class IconButton extends React.PureComponent { animate: false, overlay: false, tabIndex: '0', + ariaHidden: false, }; state = { @@ -115,6 +117,7 @@ export default class IconButton extends React.PureComponent { counter, obfuscateCount, href, + ariaHidden, } = this.props; const { @@ -155,6 +158,7 @@ export default class IconButton extends React.PureComponent {