Skip to content

Commit

Permalink
Improve UX of auto-added button
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed Jul 20, 2024
1 parent f7a3c2b commit 0d7c649
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion external/@worldbrain/memex-common
17 changes: 9 additions & 8 deletions src/annotations/components/AnnotationEditable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -732,23 +732,24 @@ export default class AnnotationEditable extends React.Component<Props, State> {
tooltipText={
this.props.isShared ? (
<span>
Disable Auto-Add
<br /> Only added to Spaces you manually select
<strong>Auto-Added: ON</strong>
<br />
Visible in all Spaces the page is in
</span>
) : (
<span>
Enable Auto-Add
<br /> Added to all Spaces the page is in
<strong>Add-added: OFF</strong>
<br /> Only visible in manually added Spaces
</span>
)
}
placement="bottom"
getPortalRoot={this.props.getRootElement}
>
<Icon
heightAndWidth="28px"
heightAndWidth="26px"
icon={'spread'}
color={this.props.isShared ? 'prime1' : 'greyScale3'}
color={this.props.isShared ? 'prime1' : 'greyScale4'}
onClick={(event) => {
event.stopPropagation()
if (event.shiftKey) {
Expand All @@ -759,7 +760,7 @@ export default class AnnotationEditable extends React.Component<Props, State> {
)(!this.props.isShared, !this.props.isShared)
}
}}
padding={'1px'}
padding={'2px'}
/>
</TooltipBox>
</AutoAddedIndicator>
Expand Down Expand Up @@ -1504,7 +1505,7 @@ export default class AnnotationEditable extends React.Component<Props, State> {

const AutoAddButtonContainer = styled.div`
position: absolute;
bottom: 2px;
bottom: 3px;
left: 10px;
z-index: 100;
`
Expand Down

0 comments on commit 0d7c649

Please sign in to comment.