From 1e8aff072a7e7d356ee3a1894c6b74966d8e11af Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 15 Dec 2022 14:07:34 +0100 Subject: [Glitch] Fix wasteful request to /api/v1/custom_emojis when not logged in Port 1f762f4271685e30373b15a2e204f8edff59d349 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/containers/mastodon.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/containers/mastodon.js b/app/javascript/flavours/glitch/containers/mastodon.js index 6c92376d8..dd7623a81 100644 --- a/app/javascript/flavours/glitch/containers/mastodon.js +++ b/app/javascript/flavours/glitch/containers/mastodon.js @@ -27,8 +27,9 @@ store.dispatch(hydrateAction); // check for deprecated local settings store.dispatch(checkDeprecatedLocalSettings()); -// load custom emojis -store.dispatch(fetchCustomEmojis()); +if (initialState.meta.me) { + store.dispatch(fetchCustomEmojis()); +} const createIdentityContext = state => ({ signedIn: !!state.meta.me, -- cgit From 65cc5cb891c46637d897e49731d2e96f4be35731 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 15 Dec 2022 15:43:16 +0100 Subject: [Glitch] Change dropdown menu to contain “Copy link to post” even for non-public posts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port fe9eab51d140ee0e0343eb07982f0a7ce825398c to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/components/status_action_bar.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js index 977c98ccb..7949b2db3 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.js +++ b/app/javascript/flavours/glitch/components/status_action_bar.js @@ -212,11 +212,13 @@ class StatusActionBar extends ImmutablePureComponent { menu.push({ text: intl.formatMessage(messages.open), action: this.handleOpen }); + if (publicStatus && isRemote) { + menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') }); + } + + menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy }); + if (publicStatus) { - if (isRemote) { - menu.push({ text: intl.formatMessage(messages.openOriginalPage), href: status.get('url') }); - } - menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy }); menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed }); } -- cgit From 8cd7b9555996f03d7fb747f17470c4f5749065dc Mon Sep 17 00:00:00 2001 From: Riedler Date: Thu, 15 Dec 2022 15:57:02 +0100 Subject: [Glitch] Fix profile avatar being slightly offset into left border Port c3388f4ab151a2603fabd67dadea435f851eaf12 to glitch-soc Co-authored-by: Riedler Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/components/accounts.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/components/accounts.scss b/app/javascript/flavours/glitch/styles/components/accounts.scss index ed1d3d660..2a955f426 100644 --- a/app/javascript/flavours/glitch/styles/components/accounts.scss +++ b/app/javascript/flavours/glitch/styles/components/accounts.scss @@ -523,7 +523,6 @@ display: block; flex: 0 0 auto; width: 94px; - margin-left: -2px; .account__avatar { background: darken($ui-base-color, 8%); @@ -540,6 +539,7 @@ margin-top: -55px; gap: 8px; overflow: hidden; + margin-left: -2px; // aligns the pfp with content below &__buttons { display: flex; -- cgit From aad42cfc35447b9fccb401471cbf335185c55a97 Mon Sep 17 00:00:00 2001 From: Alex Stine Date: Thu, 15 Dec 2022 09:20:21 -0600 Subject: [Glitch] Fix hidden label causing accessibility issue for search inputs Port 903e5a3f459d28b093438dc4827b2fb976aef406 to glitch-soc Signed-off-by: Claire --- .../glitch/features/compose/components/search.js | 36 +++++++++------------- 1 file changed, 14 insertions(+), 22 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/compose/components/search.js b/app/javascript/flavours/glitch/features/compose/components/search.js index 326fe5b70..a1963c15d 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search.js +++ b/app/javascript/flavours/glitch/features/compose/components/search.js @@ -144,28 +144,20 @@ class Search extends React.PureComponent { return (
- - -
+ + +
-- cgit From 98f7b3657a202c51a40cc079ad7f04ce96d3a37c Mon Sep 17 00:00:00 2001 From: Pleclown Date: Thu, 15 Dec 2022 16:20:34 +0100 Subject: [Glitch] Adding 12 hours option for polls Port 3a59ffde8d1600729bf51ff42f1d646062edfc8d to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/compose/components/poll_form.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/compose/components/poll_form.js b/app/javascript/flavours/glitch/features/compose/components/poll_form.js index d5edccff3..afb5da097 100644 --- a/app/javascript/flavours/glitch/features/compose/components/poll_form.js +++ b/app/javascript/flavours/glitch/features/compose/components/poll_form.js @@ -153,6 +153,7 @@ class PollForm extends ImmutablePureComponent { + -- cgit From 9f3cc9e5551a0c47cff9ebeb6e6398472107afa4 Mon Sep 17 00:00:00 2001 From: Yamagishi Kazutoshi Date: Fri, 16 Dec 2022 00:20:46 +0900 Subject: [Glitch] `FormattedMessage` must be used directly Port 58200132d07bc0b641c95af614b9ac02ce48c9fc to glitch-soc Signed-off-by: Claire --- .../flavours/glitch/features/explore/index.js | 32 +++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/explore/index.js b/app/javascript/flavours/glitch/features/explore/index.js index ba435d7e3..da0dc7f7c 100644 --- a/app/javascript/flavours/glitch/features/explore/index.js +++ b/app/javascript/flavours/glitch/features/explore/index.js @@ -24,16 +24,6 @@ const mapStateToProps = state => ({ isSearching: state.getIn(['search', 'submitted']) || !showTrends, }); -// Fix strange bug on Safari where (rendered by FormattedMessage) disappears -// after clicking around Explore top bar (issue #20885). -// Removing width=100% from also fixes it, as well as replacing with
-// We're choosing to wrap span with div to keep the changes local only to this tool bar. -const WrapFormattedMessage = ({ children, ...props }) =>
{children}
; -WrapFormattedMessage.propTypes = { - children: PropTypes.any, -}; - - export default @connect(mapStateToProps) @injectIntl class Explore extends React.PureComponent { @@ -78,12 +68,22 @@ class Explore extends React.PureComponent { {isSearching ? ( ) : ( - + <>
- - - - {signedIn && } + + + + + + + + + + {signedIn && ( + + + + )}
@@ -97,7 +97,7 @@ class Explore extends React.PureComponent { {intl.formatMessage(messages.title)} -
+ )}
-- cgit From b22da94a65fcdafe8df13fcb2bf6c88a139785c6 Mon Sep 17 00:00:00 2001 From: Francis Murillo Date: Thu, 15 Dec 2022 15:35:25 +0000 Subject: [Glitch] Render current day formats in the client timezone Port c50e9d078aa3c353afc140669f1cedcd354ee53e to glitch-soc Co-authored-by: Effy Elden Signed-off-by: Claire --- app/javascript/flavours/glitch/packs/public.js | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js index 843fd5163..b256fdbd5 100644 --- a/app/javascript/flavours/glitch/packs/public.js +++ b/app/javascript/flavours/glitch/packs/public.js @@ -42,6 +42,18 @@ function main() { minute: 'numeric', }); + const dateFormat = new Intl.DateTimeFormat(locale, { + year: 'numeric', + month: 'short', + day: 'numeric', + timeFormat: false, + }); + + const timeFormat = new Intl.DateTimeFormat(locale, { + timeStyle: 'short', + hour12: false, + }); + [].forEach.call(document.querySelectorAll('.emojify'), (content) => { content.innerHTML = emojify(content.innerHTML); }); @@ -54,6 +66,32 @@ function main() { content.textContent = formattedDate; }); + const isToday = date => { + const today = new Date(); + + return date.getDate() === today.getDate() && + date.getMonth() === today.getMonth() && + date.getFullYear() === today.getFullYear(); + }; + const todayFormat = new IntlMessageFormat(messages['relative_format.today'] || 'Today at {time}', locale); + + [].forEach.call(document.querySelectorAll('time.relative-formatted'), (content) => { + const datetime = new Date(content.getAttribute('datetime')); + + let formattedContent; + + if (isToday(datetime)) { + const formattedTime = timeFormat.format(datetime); + + formattedContent = todayFormat.format({ time: formattedTime }); + } else { + formattedContent = dateFormat.format(datetime); + } + + content.title = formattedContent; + content.textContent = formattedContent; + }); + [].forEach.call(document.querySelectorAll('time.time-ago'), (content) => { const datetime = new Date(content.getAttribute('datetime')); const now = new Date(); -- cgit From e76fb9b2c46db07d830e2fa2c0282e5f1f087434 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Thu, 15 Dec 2022 08:37:07 -0700 Subject: [Glitch] Increase the width of the unread notification border. Port 08c0e43b6fca879d7435f63b1b2c718a53c6cacc to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/components/status.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/components/status.scss b/app/javascript/flavours/glitch/styles/components/status.scss index 7cc6f5386..39184ba7a 100644 --- a/app/javascript/flavours/glitch/styles/components/status.scss +++ b/app/javascript/flavours/glitch/styles/components/status.scss @@ -1067,7 +1067,7 @@ a.status-card.compact:hover { pointer-events: 0; width: 100%; height: 100%; - border-left: 2px solid $highlight-text-color; + border-left: 4px solid $highlight-text-color; pointer-events: none; } } -- cgit From 57eab6dbee32be6efca5b93c7e848a108ada9261 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 15 Dec 2022 10:37:17 -0500 Subject: [Glitch] Fix typo in handler function call name Port 72a8af80886f270a27bd686f1fa86ef478748963 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/ui/components/columns_area.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/ui/components/columns_area.js b/app/javascript/flavours/glitch/features/ui/components/columns_area.js index bf3e79c24..993a50796 100644 --- a/app/javascript/flavours/glitch/features/ui/components/columns_area.js +++ b/app/javascript/flavours/glitch/features/ui/components/columns_area.js @@ -99,7 +99,7 @@ export default class ColumnsArea extends ImmutablePureComponent { if (this.mediaQuery.removeEventListener) { this.mediaQuery.removeEventListener('change', this.handleLayoutChange); } else { - this.mediaQuery.removeListener(this.handleLayouteChange); + this.mediaQuery.removeListener(this.handleLayoutChange); } } } -- cgit From 602f18103ccf716667a9736f4665428a9b65c34d Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 15 Dec 2022 16:40:45 +0100 Subject: [Glitch] Fix the top action bar appearing in multi-column layout Port 38596e49d4ea00b9a538f32fd443afc6aa29824a to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/components/single_column.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/components/single_column.scss b/app/javascript/flavours/glitch/styles/components/single_column.scss index 45d57aedd..992a42d78 100644 --- a/app/javascript/flavours/glitch/styles/components/single_column.scss +++ b/app/javascript/flavours/glitch/styles/components/single_column.scss @@ -281,7 +281,7 @@ } } - .ui__header { + .layout-single-column .ui__header { display: flex; background: $ui-base-color; border-bottom: 1px solid lighten($ui-base-color, 8%); -- cgit From 7883ba34bb49da19904642be973014b3f26b22f3 Mon Sep 17 00:00:00 2001 From: Meisam <39205857+MFTabriz@users.noreply.github.com> Date: Thu, 15 Dec 2022 17:04:52 +0100 Subject: [Glitch] set activation for tag follow button Port 059d64a59ea27c40ca6b5b9bf34487169d2a741f to glitch-soc Co-authored-by: meisam Signed-off-by: Claire --- app/javascript/flavours/glitch/features/hashtag_timeline/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/hashtag_timeline/index.js b/app/javascript/flavours/glitch/features/hashtag_timeline/index.js index 4428fdecf..219dc0ec6 100644 --- a/app/javascript/flavours/glitch/features/hashtag_timeline/index.js +++ b/app/javascript/flavours/glitch/features/hashtag_timeline/index.js @@ -194,7 +194,7 @@ class HashtagTimeline extends React.PureComponent { const following = tag.get('following'); followButton = ( - ); -- cgit From 0f5ecb3860f0bf5add422b30f5683b578c4205bc Mon Sep 17 00:00:00 2001 From: Mina Her Date: Fri, 16 Dec 2022 01:24:38 +0900 Subject: [Glitch] Fix margin for search field on medium window size Port cedf1383138b2e58ba6ff9aab46beddeaf1a1354 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/components/search.scss | 1 + app/javascript/flavours/glitch/styles/components/single_column.scss | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/components/search.scss b/app/javascript/flavours/glitch/styles/components/search.scss index 70af0f651..b8078bdb6 100644 --- a/app/javascript/flavours/glitch/styles/components/search.scss +++ b/app/javascript/flavours/glitch/styles/components/search.scss @@ -1,4 +1,5 @@ .search { + margin-bottom: 10px; position: relative; } diff --git a/app/javascript/flavours/glitch/styles/components/single_column.scss b/app/javascript/flavours/glitch/styles/components/single_column.scss index 992a42d78..74e5d0884 100644 --- a/app/javascript/flavours/glitch/styles/components/single_column.scss +++ b/app/javascript/flavours/glitch/styles/components/single_column.scss @@ -227,8 +227,7 @@ height: calc(100% - 10px) !important; } - .getting-started__wrapper, - .search { + .getting-started__wrapper { margin-bottom: 10px; } -- cgit From 89d3d85cf21df93c04e09cb1182884c1534a8f48 Mon Sep 17 00:00:00 2001 From: Terence Eden Date: Thu, 15 Dec 2022 16:38:35 +0000 Subject: [Glitch] Add transparancy to modal background for accessibility Port ff414a5489fd2c6d154b18effca24dde54d92958 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/styles/modal.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/styles/modal.scss b/app/javascript/flavours/glitch/styles/modal.scss index 6c6de4206..a333926dd 100644 --- a/app/javascript/flavours/glitch/styles/modal.scss +++ b/app/javascript/flavours/glitch/styles/modal.scss @@ -1,5 +1,5 @@ .modal-layout { - background: $ui-base-color url('data:image/svg+xml;utf8,') repeat-x bottom fixed; + background: $ui-base-color url('data:image/svg+xml;utf8,') repeat-x bottom fixed; display: flex; flex-direction: column; height: 100vh; -- cgit From d7a6a9393a8b4ba3e578bf3ecaa08dd34100e8b8 Mon Sep 17 00:00:00 2001 From: Rens Groothuijsen Date: Thu, 15 Dec 2022 17:38:50 +0100 Subject: [Glitch] Display search popout at fixed screen position Port 726c7dea31d2ee60b327afd327e945e3ece09ac4 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/features/compose/components/search.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/compose/components/search.js b/app/javascript/flavours/glitch/features/compose/components/search.js index a1963c15d..9f90a767d 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search.js +++ b/app/javascript/flavours/glitch/features/compose/components/search.js @@ -161,8 +161,7 @@ class Search extends React.PureComponent {
- - +
-- cgit From cdba1ec5f4edd3e3095c161f34f8d1cc3beebaef Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 15 Dec 2022 17:47:43 +0100 Subject: [Glitch] Fix being stuck in edit mode when deleting the edited status Port ebf1d74e409ece10864a8615691cd80c434c9055 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/reducers/compose.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index ddc3fa41e..814b6a1a7 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -538,6 +538,8 @@ export default function compose(state = initialState, action) { case TIMELINE_DELETE: if (action.id === state.get('in_reply_to')) { return state.set('in_reply_to', null); + } else if (action.id === state.get('id')) { + return state.set('id', null); } else { return state; } -- cgit From 1ced365371bebe667b05eb1cd593f97a1851a335 Mon Sep 17 00:00:00 2001 From: Bramus! Date: Thu, 15 Dec 2022 18:37:47 +0100 Subject: [Glitch] Fix media markup Port 7fbc17afa246c5cd384123ace51e07622204b67c to glitch-soc Co-authored-by: Effy Elden Signed-off-by: Claire --- .../flavours/glitch/features/account_gallery/components/media_item.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js index f7a7fd467..f20ee685e 100644 --- a/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js +++ b/app/javascript/flavours/glitch/features/account_gallery/components/media_item.js @@ -104,6 +104,7 @@ export default class MediaItem extends ImmutablePureComponent {