From 5f990edfb9685978403391cde80d09be4a77fdef Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Tue, 31 Jan 2023 01:09:14 +0900 Subject: [PATCH 1/2] refs #345 Add title text for buttons --- src/components/Navigator.tsx | 6 +++--- src/components/timelines/Conversations.tsx | 6 +++--- src/components/timelines/New.tsx | 4 ++-- src/components/timelines/Notifications.tsx | 7 ++++--- src/components/timelines/Timeline.tsx | 8 ++++---- .../timelines/conversation/Conversation.tsx | 2 +- .../timelines/notification/Follow.tsx | 2 ++ .../timelines/notification/Reaction.tsx | 8 +++++++- .../timelines/status/ActionButton.tsx | 5 +++-- src/components/timelines/status/Actions.tsx | 20 +++++++++++++++---- src/components/timelines/status/Status.tsx | 2 ++ 11 files changed, 47 insertions(+), 23 deletions(-) diff --git a/src/components/Navigator.tsx b/src/components/Navigator.tsx index d4c72a25..5d5b1d18 100644 --- a/src/components/Navigator.tsx +++ b/src/components/Navigator.tsx @@ -35,7 +35,7 @@ const Navigator: React.FC = (props): ReactElement => { - {servers.map(server => ( @@ -48,7 +48,7 @@ const Navigator: React.FC = (props): ReactElement => { serverMenu({ className, left, top, onClose, server, openAuthorize }, ref) } > - diff --git a/src/components/timelines/Conversations.tsx b/src/components/timelines/Conversations.tsx index ac001816..78dee310 100644 --- a/src/components/timelines/Conversations.tsx +++ b/src/components/timelines/Conversations.tsx @@ -145,7 +145,7 @@ const Conversations: React.FC = props => { textOverflow: 'ellipsis', whiteSpace: 'nowrap' }} - title={props.server.domain} + title={'DM@' + props.server.domain} > Direct messages @{props.server.domain} @@ -162,13 +162,13 @@ const Conversations: React.FC = props => { ref={triggerRef} speaker={} > - - + diff --git a/src/components/timelines/New.tsx b/src/components/timelines/New.tsx index 28997d01..c532f523 100644 --- a/src/components/timelines/New.tsx +++ b/src/components/timelines/New.tsx @@ -158,7 +158,7 @@ const New: React.FC = props => { > - } size="lg" appearance="ghost" /> + } size="lg" appearance="ghost" title="Add a new timeline" /> @@ -180,7 +180,7 @@ const New: React.FC = props => { @{server.domain} - diff --git a/src/components/timelines/Notifications.tsx b/src/components/timelines/Notifications.tsx index 8237842a..2efc9be1 100644 --- a/src/components/timelines/Notifications.tsx +++ b/src/components/timelines/Notifications.tsx @@ -11,6 +11,7 @@ import { Account } from 'src/entities/account' import { Server } from 'src/entities/server' import { Timeline } from 'src/entities/timeline' import Notification from './notification/Notification' +import FailoverImg from 'src/utils/failoverImg' import { ReceiveNotificationPayload } from 'src/payload' import { Unread } from 'src/entities/unread' import { TIMELINE_STATUSES_COUNT, TIMELINE_MAX_STATUSES } from 'src/defaults' @@ -232,7 +233,7 @@ const Notifications: React.FC = props => { textOverflow: 'ellipsis', whiteSpace: 'nowrap' }} - title={props.server.domain} + title={props.timeline.name + '' + props.server.domain} > {props.timeline.name} @{props.server.domain} @@ -260,13 +261,13 @@ const Notifications: React.FC = props => { ref={triggerRef} speaker={} > - - + diff --git a/src/components/timelines/Timeline.tsx b/src/components/timelines/Timeline.tsx index 1017e2d3..6ac1610a 100644 --- a/src/components/timelines/Timeline.tsx +++ b/src/components/timelines/Timeline.tsx @@ -303,7 +303,7 @@ const Timeline: React.FC = props => { textOverflow: 'ellipsis', whiteSpace: 'nowrap' }} - title={props.server.domain} + title={props.timeline.name + '@' + props.server.domain} > {props.timeline.name} @{props.server.domain} @@ -314,7 +314,7 @@ const Timeline: React.FC = props => { {reloadEnabled(props.timeline.kind) && ( - @@ -328,13 +328,13 @@ const Timeline: React.FC = props => { ref={triggerRef} speaker={} > - - + diff --git a/src/components/timelines/conversation/Conversation.tsx b/src/components/timelines/conversation/Conversation.tsx index 7153ee38..d8c00369 100644 --- a/src/components/timelines/conversation/Conversation.tsx +++ b/src/components/timelines/conversation/Conversation.tsx @@ -26,7 +26,7 @@ const Conversation: React.FC = props => { style={{ cursor: 'pointer' }} >
- +
{/** message **/} diff --git a/src/components/timelines/notification/Follow.tsx b/src/components/timelines/notification/Follow.tsx index f0be70a7..ea79fc3d 100644 --- a/src/components/timelines/notification/Follow.tsx +++ b/src/components/timelines/notification/Follow.tsx @@ -57,6 +57,8 @@ const Follow: React.FC = props => { src={props.notification.account.avatar} onClick={() => props.setAccountDetail(props.notification.account)} style={{ cursor: 'pointer' }} + title={props.notification.account.acct} + alt={props.notification.account.acct} /> diff --git a/src/components/timelines/notification/Reaction.tsx b/src/components/timelines/notification/Reaction.tsx index 83897c6e..91faed3d 100644 --- a/src/components/timelines/notification/Reaction.tsx +++ b/src/components/timelines/notification/Reaction.tsx @@ -136,7 +136,13 @@ const Reaction: React.FC = props => { {/** icon **/}
- props.setAccountDetail(status.account)} style={{ cursor: 'pointer' }} /> + props.setAccountDetail(status.account)} + style={{ cursor: 'pointer' }} + title={status.account.acct} + alt={status.account.acct} + />
{/** status **/} diff --git a/src/components/timelines/status/ActionButton.tsx b/src/components/timelines/status/ActionButton.tsx index c919f3f7..bd23796e 100644 --- a/src/components/timelines/status/ActionButton.tsx +++ b/src/components/timelines/status/ActionButton.tsx @@ -1,4 +1,4 @@ -import { ReactElement } from 'react' +import { ReactElement, HTMLAttributes } from 'react' import { IconButton } from 'rsuite' type Props = { @@ -8,7 +8,7 @@ type Props = { className?: string activating?: boolean deactivating?: boolean -} +} & HTMLAttributes const ActionButton: React.FC = props => { const className = () => { @@ -27,6 +27,7 @@ const ActionButton: React.FC = props => { icon={props.icon} onClick={props.onClick} disabled={props.disabled} + title={props.title} /> ) } diff --git a/src/components/timelines/status/Actions.tsx b/src/components/timelines/status/Actions.tsx index 277d105b..01da1c2d 100644 --- a/src/components/timelines/status/Actions.tsx +++ b/src/components/timelines/status/Actions.tsx @@ -108,7 +108,12 @@ const Actions: React.FC = props => {
- } onClick={() => props.setShowReply(current => !current)} /> + } + onClick={() => props.setShowReply(current => !current)} + title="Reply" + /> = props => { deactivating={reblogDeactivating} icon={reblogIcon(props.status)} onClick={reblog} + title="Reblog" /> @@ -128,18 +134,24 @@ const Actions: React.FC = props => { deactivating={favouriteDeactivating} icon={favouriteIcon(props.status)} onClick={favourite} + title="Favourite" /> - + }> - } disabled={props.disabled || props.server.sns === 'mastodon'} /> + } + disabled={props.disabled || props.server.sns === 'mastodon'} + title="Emoji reaction" + /> - } disabled /> + } disabled title="Details" />
diff --git a/src/components/timelines/status/Status.tsx b/src/components/timelines/status/Status.tsx index 71205888..2b06ff04 100644 --- a/src/components/timelines/status/Status.tsx +++ b/src/components/timelines/status/Status.tsx @@ -77,6 +77,8 @@ const Status: React.FC = props => { src={status.account.avatar} onClick={() => props.setAccountDetail(status.account.id, props.server.id, props.account?.id)} style={{ cursor: 'pointer' }} + title={status.account.acct} + alt={status.account.acct} /> From c357c59496bf6324a7aad39804aea2da8873eca1 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Tue, 31 Jan 2023 01:13:45 +0900 Subject: [PATCH 2/2] Fix roadmap --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41773bb8..8353c41a 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,13 @@ Please be careful when using. - [x] DirectMessages - [x] Streaming - [x] Notification -- [x] Status actions +- [ ] Status actions - [x] Reply - [x] Reblog - [x] Favourite - [x] Bookmark - [x] Emoji reaction + - [ ] Edit statuses - [x] User Profile - [x] Show profile - [x] Show followers @@ -38,13 +39,12 @@ Please be careful when using. - [x] Show user timeline - [x] Follow/Unfollow - [x] Mute/Block -- [ ] Status detail +- [x] Status detail - [x] Show media - [x] Handle NSFW and CW - [x] Show the thread - [x] Link preview - [x] Show and vote polls - - [ ] Edit statuses - [ ] Post statuses - [x] Post statuses - [x] Add emoji