From 1e1293e3c841e156413434078d403ceecc4f70c4 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 1 Dec 2019 17:25:29 +0100 Subject: [Glitch] Add follow_request notification type Port 911cc144815babf83ddf99f2daa3682021d401b8 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/styles/components/status.scss | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/styles') diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss index 77d67576b..00f947cdc 100644 --- a/app/javascript/flavours/glitch/styles/components/status.scss +++ b/app/javascript/flavours/glitch/styles/components/status.scss @@ -232,7 +232,9 @@ } .notif-cleaning { - .status, .notification-follow { + .status, + .notification-follow, + .notification-follow-request { padding-right: ($dismiss-overlay-width + 0.5rem); } } @@ -256,7 +258,8 @@ position: absolute; } -.notification-follow { +.notification-follow, +.notification-follow-request { position: relative; // same like Status -- cgit From c6ba870f005e0393da6ba8de00246501623d52e7 Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 3 Dec 2019 19:53:16 +0100 Subject: [Glitch] Fix poll options not being selectable via keyboard Port c05ed8a6254bc82fda3ae0fd3934dc2cdcf7c82d to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/components/poll.js | 28 +++++++++++++++++++---- app/javascript/flavours/glitch/styles/polls.scss | 17 ++++++++++++++ 2 files changed, 41 insertions(+), 4 deletions(-) (limited to 'app/javascript/flavours/glitch/styles') diff --git a/app/javascript/flavours/glitch/components/poll.js b/app/javascript/flavours/glitch/components/poll.js index 2d2a7cbe0..62965df94 100644 --- a/app/javascript/flavours/glitch/components/poll.js +++ b/app/javascript/flavours/glitch/components/poll.js @@ -67,9 +67,7 @@ class Poll extends ImmutablePureComponent { } } - handleOptionChange = e => { - const { target: { value } } = e; - + _toggleOption = value => { if (this.props.poll.get('multiple')) { const tmp = { ...this.state.selected }; if (tmp[value]) { @@ -83,8 +81,20 @@ class Poll extends ImmutablePureComponent { tmp[value] = true; this.setState({ selected: tmp }); } + } + + handleOptionChange = ({ target: { value } }) => { + this._toggleOption(value); }; + handleOptionKeyPress = (e) => { + if (e.key === 'Enter' || e.key === ' ') { + this._toggleOption(e.target.getAttribute('data-index')); + e.stopPropagation(); + e.preventDefault(); + } + } + handleVote = () => { if (this.props.disabled) { return; @@ -135,7 +145,17 @@ class Poll extends ImmutablePureComponent { disabled={disabled} /> - {!showResults && } + {!showResults && ( + + )} {showResults && {!!voted && } {Math.round(percent)}% diff --git a/app/javascript/flavours/glitch/styles/polls.scss b/app/javascript/flavours/glitch/styles/polls.scss index 95d8e510c..b43da1e28 100644 --- a/app/javascript/flavours/glitch/styles/polls.scss +++ b/app/javascript/flavours/glitch/styles/polls.scss @@ -98,6 +98,23 @@ border-color: $valid-value-color; background: $valid-value-color; } + + &:active, + &:focus, + &:hover { + border-width: 4px; + background: none; + } + + &::-moz-focus-inner { + outline: 0 !important; + border: 0; + } + + &:focus, + &:active { + outline: 0 !important; + } } &__number { -- cgit From d4c22d48df62c33d6fea59691fca3c3bf6c15cd3 Mon Sep 17 00:00:00 2001 From: Hinaloe Date: Thu, 5 Dec 2019 08:51:07 +0900 Subject: [Glitch] Highlight border when focusing poll-form footer Port eb551c480d4c687d75d6bc94915adfcd8aae93fb to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/styles/polls.scss | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/javascript/flavours/glitch/styles') diff --git a/app/javascript/flavours/glitch/styles/polls.scss b/app/javascript/flavours/glitch/styles/polls.scss index b43da1e28..49d0e7f71 100644 --- a/app/javascript/flavours/glitch/styles/polls.scss +++ b/app/javascript/flavours/glitch/styles/polls.scss @@ -185,6 +185,10 @@ select { width: 100%; flex: 1 1 50%; + + &:focus { + border-color: $highlight-text-color; + } } } -- cgit