about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-04-09 22:43:21 +0200
committerGitHub <noreply@github.com>2023-04-09 22:43:21 +0200
commit14aa7b3c76c4d011a9ea3c05b007343b8ca1e203 (patch)
treed3147d9d92763b38631731422a3f4f9af3386314 /app/javascript/flavours/glitch/components
parentff168ef2024626f37fa776fde5739dcd58ecb9f2 (diff)
parent63a39ae2faba65d0234a9f9e261e31dbf4bd5adb (diff)
Merge pull request #2170 from ClearlyClaire/glitch-soc/merge-upstream
* Bump addressable from 2.8.1 to 2.8.2 (#24392)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump typescript from 4.9.5 to 5.0.3 (#24398)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add typechecking in CI (#24405)

* HTML string attributes set as booleans (#24408)

* Ensure tabIndex is number instead of string (#24409)

* Fix styling regressions from RTL layout refactor (#24415)

* Enable Stylelint property-no-unknown (#24404)

* SUBMIT doesn't exist on XMLHttpRequest (#24423)

* Set marginRight as string (#24422)

* Update display_media typing to string (#24416)

* Bump aws-sdk-s3 from 1.119.2 to 1.120.0 (#24401)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump capybara from 3.38.0 to 3.39.0 (#24395)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump puma from 6.1.1 to 6.2.1 (#24402)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump rubocop from 1.48.1 to 1.49.0 (#24387)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix height of announcements not being updated when using reduced animations (#24354)

* Check for missing JSON translations (#24338)

* Fix user archive takeouts when using OpenStack Swift (#24431)

* Fix DevContainer post-create warnings (#23977)

* New Crowdin updates (#24378)

Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>

* Bump version to v4.1.2 (#24427)

* Fix user settings migration script failing in some cases (#24453)

* Fix account header image missing in low-res (#24433)

* Remove Array.prototype.includes polyfill (#24234)

* Remove duplicate ca-certificates Docker install (#24231)

* Remove unused methods in 2FA OTP Auth Controller (#24220)

* Update Node.js to 16.20.0 (#24316)

* Expand coverage for "system checks" (#24216)

* Fix loading spinner + infinite scroll for private mentions (#24446)

* Fix tooltip for dates without time (#24244)

* Fix crash in NotifyService when trying to send an email notification for post edits (#24460)

* [Glitch] HTML string attributes set as booleans

Port a425915ce7d1148e9505c87889936c4c497061dd to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] SUBMIT doesn't exist on XMLHttpRequest

Port ab3f23da916c8578148fe92fe008da19b8a7ed02 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Set marginRight as string

Port 927b2fd1386bce6fda1d2ff53ceadd82289d77ce to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Update display_media typing to string

Port 17b2fd217730e6fd598aa6664373d8d7779c28c1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Fix height of announcements not being updated when using reduced animations

Port ffd5b2eea4503c2ee389c7aa5dff9c51dbf9f846 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Fix account header image missing in low-res

Port d7b8c6db7ec4d9b3fe39cbf8f1b32d152e70b8f1 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Remove Array.prototype.includes polyfill

Port c0886dee1480cecedb7e8b152c848f061ab7f81e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Fix tooltip for dates without time

Port aa136cf2fa177af1fea59279cb8bab0b2a042b2b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Enable Stylelint property-no-unknown

Port cd14f712ad9f5a6ebdbec8c9b87740cd76d949e7 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Fix loading spinner + infinite scroll for private mentions

Port 9ef9974ff207fe91291c81c7a9b9bb83e0df8e16 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Ensure tabIndex is number instead of string

Port ec0c104bf25f2689c31bb79f9f447be1a9b3da7f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>

* [Glitch] Fix user settings migration script failing in some cases

* Move glitch-soc-only translation strings out of `app/javascript/mastodono/locales`

* Run `yarn manage:translations`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nick Schonning <nschonni@gmail.com>
Co-authored-by: Christian Schmidt <github@chsc.dk>
Co-authored-by: Eugen Rochko <eugen@zeonfederated.com>
Co-authored-by: Yamagishi Kazutoshi <ykzts@desire.sh>
Co-authored-by: Matt Jankowski <matt@jankowski.online>
Diffstat (limited to 'app/javascript/flavours/glitch/components')
-rw-r--r--app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx4
-rw-r--r--app/javascript/flavours/glitch/components/autosuggest_input.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/autosuggest_textarea.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/column_back_button_slim.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/dropdown_menu.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/error_boundary.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/gifv.jsx4
-rw-r--r--app/javascript/flavours/glitch/components/intersection_observer_article.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/picture_in_picture_placeholder.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/poll.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/spoilers.jsx2
-rw-r--r--app/javascript/flavours/glitch/components/status.jsx6
-rw-r--r--app/javascript/flavours/glitch/components/status_content.jsx10
13 files changed, 21 insertions, 21 deletions
diff --git a/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx b/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx
index 8478ba366..ecefe7a84 100644
--- a/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx
+++ b/app/javascript/flavours/glitch/components/admin/ReportReasonSelector.jsx
@@ -33,7 +33,7 @@ class Category extends React.PureComponent {
     const { id, text, disabled, selected, children } = this.props;
 
     return (
-      <div tabIndex='0' role='button' className={classNames('report-reason-selector__category', { selected, disabled })} onClick={this.handleClick}>
+      <div tabIndex={0} role='button' className={classNames('report-reason-selector__category', { selected, disabled })} onClick={this.handleClick}>
         {selected && <input type='hidden' name='report[category]' value={id} />}
 
         <div className='report-reason-selector__category__label'>
@@ -74,7 +74,7 @@ class Rule extends React.PureComponent {
     const { id, text, disabled, selected } = this.props;
 
     return (
-      <div tabIndex='0' role='button' className={classNames('report-reason-selector__rule', { selected, disabled })} onClick={this.handleClick}>
+      <div tabIndex={0} role='button' className={classNames('report-reason-selector__rule', { selected, disabled })} onClick={this.handleClick}>
         <span className={classNames('poll__input', { checkbox: true, active: selected, disabled })} />
         {selected && <input type='hidden' name='report[rule_ids][]' value={id} />}
         {text}
diff --git a/app/javascript/flavours/glitch/components/autosuggest_input.jsx b/app/javascript/flavours/glitch/components/autosuggest_input.jsx
index 90ff298c0..ea9fd0828 100644
--- a/app/javascript/flavours/glitch/components/autosuggest_input.jsx
+++ b/app/javascript/flavours/glitch/components/autosuggest_input.jsx
@@ -180,7 +180,7 @@ export default class AutosuggestInput extends ImmutablePureComponent {
     }
 
     return (
-      <div role='button' tabIndex='0' key={key} data-index={i} className={classNames('autosuggest-textarea__suggestions__item', { selected: i === selectedSuggestion })} onMouseDown={this.onSuggestionClick}>
+      <div role='button' tabIndex={0} key={key} data-index={i} className={classNames('autosuggest-textarea__suggestions__item', { selected: i === selectedSuggestion })} onMouseDown={this.onSuggestionClick}>
         {inner}
       </div>
     );
diff --git a/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx b/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx
index 6e6e567b9..a016e44b7 100644
--- a/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx
+++ b/app/javascript/flavours/glitch/components/autosuggest_textarea.jsx
@@ -186,7 +186,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent {
     }
 
     return (
-      <div role='button' tabIndex='0' key={key} data-index={i} className={classNames('autosuggest-textarea__suggestions__item', { selected: i === selectedSuggestion })} onMouseDown={this.onSuggestionClick}>
+      <div role='button' tabIndex={0} key={key} data-index={i} className={classNames('autosuggest-textarea__suggestions__item', { selected: i === selectedSuggestion })} onMouseDown={this.onSuggestionClick}>
         {inner}
       </div>
     );
diff --git a/app/javascript/flavours/glitch/components/column_back_button_slim.jsx b/app/javascript/flavours/glitch/components/column_back_button_slim.jsx
index b43d85b3b..4df045b5f 100644
--- a/app/javascript/flavours/glitch/components/column_back_button_slim.jsx
+++ b/app/javascript/flavours/glitch/components/column_back_button_slim.jsx
@@ -26,7 +26,7 @@ export default class ColumnBackButtonSlim extends React.PureComponent {
   render () {
     return (
       <div className='column-back-button--slim'>
-        <div role='button' tabIndex='0' onClick={this.handleClick} className='column-back-button column-back-button--slim-button'>
+        <div role='button' tabIndex={0} onClick={this.handleClick} className='column-back-button column-back-button--slim-button'>
           <Icon id='chevron-left' className='column-back-button__icon' fixedWidth />
           <FormattedMessage id='column_back_button.label' defaultMessage='Back' />
         </div>
diff --git a/app/javascript/flavours/glitch/components/dropdown_menu.jsx b/app/javascript/flavours/glitch/components/dropdown_menu.jsx
index f4b6e059f..7fb75b59e 100644
--- a/app/javascript/flavours/glitch/components/dropdown_menu.jsx
+++ b/app/javascript/flavours/glitch/components/dropdown_menu.jsx
@@ -119,7 +119,7 @@ class DropdownMenu extends React.PureComponent {
 
     return (
       <li className='dropdown-menu__item' key={`${text}-${i}`}>
-        <a href={href} target={target} data-method={method} rel='noopener noreferrer' role='button' tabIndex='0' ref={i === 0 ? this.setFocusRef : null} onClick={this.handleClick} onKeyPress={this.handleItemKeyPress} data-index={i}>
+        <a href={href} target={target} data-method={method} rel='noopener noreferrer' role='button' tabIndex={0} ref={i === 0 ? this.setFocusRef : null} onClick={this.handleClick} onKeyPress={this.handleItemKeyPress} data-index={i}>
           {text}
         </a>
       </li>
diff --git a/app/javascript/flavours/glitch/components/error_boundary.jsx b/app/javascript/flavours/glitch/components/error_boundary.jsx
index 8518dfc86..234a53417 100644
--- a/app/javascript/flavours/glitch/components/error_boundary.jsx
+++ b/app/javascript/flavours/glitch/components/error_boundary.jsx
@@ -72,7 +72,7 @@ export default class ErrorBoundary extends React.PureComponent {
     }
 
     return (
-      <div tabIndex='-1'>
+      <div tabIndex={-1}>
         <div className='error-boundary'>
           <h1><FormattedMessage id='web_app_crash.title' defaultMessage="We're sorry, but something went wrong with the Mastodon app." /></h1>
           <p>
diff --git a/app/javascript/flavours/glitch/components/gifv.jsx b/app/javascript/flavours/glitch/components/gifv.jsx
index 9ec201c6c..1ce7e7c29 100644
--- a/app/javascript/flavours/glitch/components/gifv.jsx
+++ b/app/javascript/flavours/glitch/components/gifv.jsx
@@ -46,7 +46,7 @@ export default class GIFV extends React.PureComponent {
             width={width}
             height={height}
             role='button'
-            tabIndex='0'
+            tabIndex={0}
             aria-label={alt}
             title={alt}
             lang={lang}
@@ -57,7 +57,7 @@ export default class GIFV extends React.PureComponent {
         <video
           src={src}
           role='button'
-          tabIndex='0'
+          tabIndex={0}
           aria-label={alt}
           title={alt}
           lang={lang}
diff --git a/app/javascript/flavours/glitch/components/intersection_observer_article.jsx b/app/javascript/flavours/glitch/components/intersection_observer_article.jsx
index 77cd66358..6c00e557d 100644
--- a/app/javascript/flavours/glitch/components/intersection_observer_article.jsx
+++ b/app/javascript/flavours/glitch/components/intersection_observer_article.jsx
@@ -120,7 +120,7 @@ export default class IntersectionObserverArticle extends React.Component {
         aria-posinset={index + 1}
         aria-setsize={listLength}
         data-id={id}
-        tabIndex='0'
+        tabIndex={0}
         style={style}
       >
         {children && React.cloneElement(children, { hidden: !isIntersecting && (isHidden || !!cachedHeight) })}
diff --git a/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.jsx b/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.jsx
index 961d3dead..9d1b7f55a 100644
--- a/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.jsx
+++ b/app/javascript/flavours/glitch/components/picture_in_picture_placeholder.jsx
@@ -58,7 +58,7 @@ class PictureInPicturePlaceholder extends React.PureComponent {
     const { height } = this.state;
 
     return (
-      <div ref={this.setRef} className='picture-in-picture-placeholder' style={{ height }} role='button' tabIndex='0' onClick={this.handleClick}>
+      <div ref={this.setRef} className='picture-in-picture-placeholder' style={{ height }} role='button' tabIndex={0} onClick={this.handleClick}>
         <Icon id='window-restore' />
         <FormattedMessage id='picture_in_picture.restore' defaultMessage='Put it back' />
       </div>
diff --git a/app/javascript/flavours/glitch/components/poll.jsx b/app/javascript/flavours/glitch/components/poll.jsx
index 2ccc1761e..fb37612d9 100644
--- a/app/javascript/flavours/glitch/components/poll.jsx
+++ b/app/javascript/flavours/glitch/components/poll.jsx
@@ -154,7 +154,7 @@ class Poll extends ImmutablePureComponent {
           {!showResults && (
             <span
               className={classNames('poll__input', { checkbox: poll.get('multiple'), active })}
-              tabIndex='0'
+              tabIndex={0}
               role={poll.get('multiple') ? 'checkbox' : 'radio'}
               onKeyPress={this.handleOptionKeyPress}
               aria-checked={active}
diff --git a/app/javascript/flavours/glitch/components/spoilers.jsx b/app/javascript/flavours/glitch/components/spoilers.jsx
index 75e4ec3a1..d1d875807 100644
--- a/app/javascript/flavours/glitch/components/spoilers.jsx
+++ b/app/javascript/flavours/glitch/components/spoilers.jsx
@@ -38,7 +38,7 @@ class Spoilers extends React.PureComponent {
       <p className='spoiler__text'>
         {spoilerText}
         {' '}
-        <button tabIndex='0' className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
+        <button tabIndex={0} className='status__content__spoiler-link' onClick={this.handleSpoilerClick}>
           {toggleText}
         </button>
       </p>,
diff --git a/app/javascript/flavours/glitch/components/status.jsx b/app/javascript/flavours/glitch/components/status.jsx
index fa90c98d0..fbb610823 100644
--- a/app/javascript/flavours/glitch/components/status.jsx
+++ b/app/javascript/flavours/glitch/components/status.jsx
@@ -564,7 +564,7 @@ class Status extends ImmutablePureComponent {
     if (hidden) {
       return (
         <HotKeys handlers={handlers}>
-          <div ref={this.handleRef} className='status focusable' tabIndex='0'>
+          <div ref={this.handleRef} className='status focusable' tabIndex={0}>
             <span>{status.getIn(['account', 'display_name']) || status.getIn(['account', 'username'])}</span>
             <span>{status.get('content')}</span>
           </div>
@@ -581,7 +581,7 @@ class Status extends ImmutablePureComponent {
 
       return (
         <HotKeys handlers={minHandlers}>
-          <div className='status__wrapper status__wrapper--filtered focusable' tabIndex='0' ref={this.handleRef}>
+          <div className='status__wrapper status__wrapper--filtered focusable' tabIndex={0} ref={this.handleRef}>
             <FormattedMessage id='status.filtered' defaultMessage='Filtered' />: {matchedFilters.join(', ')}.
             {' '}
             <button className='status__wrapper--filtered__button' onClick={this.handleUnfilterClick}>
@@ -769,7 +769,7 @@ class Status extends ImmutablePureComponent {
           style={isCollapsed && background ? { backgroundImage: `url(${background})` } : null}
           {...selectorAttribs}
           ref={handleRef}
-          tabIndex='0'
+          tabIndex={0}
           data-featured={featured ? 'true' : null}
           aria-label={textForScreenReader(intl, status, rebloggedByText, !status.get('hidden'))}
         >
diff --git a/app/javascript/flavours/glitch/components/status_content.jsx b/app/javascript/flavours/glitch/components/status_content.jsx
index 34742c81b..e66df588a 100644
--- a/app/javascript/flavours/glitch/components/status_content.jsx
+++ b/app/javascript/flavours/glitch/components/status_content.jsx
@@ -387,7 +387,7 @@ class StatusContent extends React.PureComponent {
       }
 
       return (
-        <div className={classNames} tabIndex='0' onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp}>
+        <div className={classNames} tabIndex={0} onMouseDown={this.handleMouseDown} onMouseUp={this.handleMouseUp}>
           <p
             style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}
           >
@@ -424,14 +424,14 @@ class StatusContent extends React.PureComponent {
           className={classNames}
           onMouseDown={this.handleMouseDown}
           onMouseUp={this.handleMouseUp}
-          tabIndex='0'
+          tabIndex={0}
         >
           <div
             ref={this.setContentsRef}
             key={`contents-${tagLinks}-${rewriteMentions}`}
             dangerouslySetInnerHTML={content}
             className='status__content__text translate'
-            tabIndex='0'
+            tabIndex={0}
             onMouseEnter={this.handleMouseEnter}
             onMouseLeave={this.handleMouseLeave}
             lang={lang}
@@ -445,14 +445,14 @@ class StatusContent extends React.PureComponent {
       return (
         <div
           className='status__content'
-          tabIndex='0'
+          tabIndex={0}
         >
           <div
             ref={this.setContentsRef}
             key={`contents-${tagLinks}`}
             className='status__content__text translate'
             dangerouslySetInnerHTML={content}
-            tabIndex='0'
+            tabIndex={0}
             onMouseEnter={this.handleMouseEnter}
             onMouseLeave={this.handleMouseLeave}
             lang={lang}