Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust placement of focus toggle #1875

Merged
merged 5 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

* Moved the "Focus on Selected" toggle next to the "Show confidence intervals" toggle.
([#1875](https://github.com/nextstrain/auspice/pull/1875))

## version 2.59.0 - 2024/10/22


Expand Down
4 changes: 2 additions & 2 deletions src/components/controls/choose-explode-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class ChooseExplodeAttr extends React.Component {
return (
<div style={{paddingTop: 10}}>
<SidebarSubtitleFlex data-tip data-for="explode_tree">
<span>
<ImLab style={{ marginRight: "5px" }}/>
<span style={{ position: "relative" }}>
<ImLab style={{ position: "absolute", left: "-14px", top: "2px", fontSize: "10px" }}/>
{t("sidebar:Explode Tree By")}
</span>
{tooltip && !this.props.mobileDisplay && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/choose-metric.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ChooseMetric extends React.Component {

{this.props.showTreeToo ?
null : (
<div style={{margin: 5}}>
<div style={{marginBottom: 5}}>
<Toggle
display={this.props.temporalConfidence.display}
on={this.props.temporalConfidence.on}
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ function Controls() {
tooltip={TreeInfo}
options={<>
<ChooseLayout />
<ToggleFocus tooltip={ToggleFocusInfo} />
<ChooseMetric />
<ToggleFocus tooltip={ToggleFocusInfo} />
<ChooseBranchLabelling />
<ChooseTipLabel />
<ChooseSecondTree />
Expand Down
6 changes: 5 additions & 1 deletion src/components/controls/toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SidebarSubtitle } from "./styles";
const ToggleContainer = styled.div`
// Same as ToggleBackground, necessary for panel toggles.
height: 21px;
position: relative;
`

const ToggleBackground = styled.label`
Expand All @@ -31,7 +32,10 @@ const ToggleSubtitle = styled(SidebarSubtitle)`

const ExperimentalIcon = styled.span`
color: ${(props) => props.theme.color};
margin-right: 5px;
font-size: 10px;
position: absolute;
left: -12px;
top: 6px;
`

const Slider = styled.div`
Expand Down