Skip to content
Open
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
20 changes: 10 additions & 10 deletions locales/en-US/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -315,16 +315,17 @@ ErrorBoundary--report-error-to-developers-description =
# This is used in a call to action button, displayed inside the error box.
ErrorBoundary--report-error-on-github = Report the error on GitHub

## Footer Links

FooterLinks--legal = Legal
FooterLinks--Privacy = Privacy
FooterLinks--Cookies = Cookies
FooterLinks--languageSwitcher--select =
## Settings Menu
## The settings popup opened from the cog icon in the top bar.

SettingsMenu--button =
.title = Settings
SettingsMenu--docs = Docs
SettingsMenu--legal = Legal
SettingsMenu--privacy = Privacy
SettingsMenu--cookies = Cookies
SettingsMenu--language-switcher =
.title = Change language
FooterLinks--hide-button =
.title = Hide footer links
.aria-label = Hide footer links

## FullTimeline
## The timeline component of the full view in the analysis UI at the top of the
Expand Down Expand Up @@ -576,7 +577,6 @@ MenuButtons--index--share-error-uploading =
.label = Error uploading

MenuButtons--index--revert = Revert to Original Profile
MenuButtons--index--docs = Docs

MenuButtons--permalink--button =
.label = Permalink
Expand Down
6 changes: 6 additions & 0 deletions res/img/svg/cog-12.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions res/img/svg/cog-light-12.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/app/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import * as React from 'react';

import { InnerNavigationLink } from 'firefox-profiler/components/shared/InnerNavigationLink';
import { ThemeToggle } from './ThemeToggle';
import { SettingsMenu } from './SettingsMenu';

import './AppHeader.css';
import { Localized } from '@fluent/react';
Expand Down Expand Up @@ -44,7 +44,7 @@ export class AppHeader extends React.PureComponent<{}> {
</span>
</Localized>
<div className="appHeaderRightControls">
<ThemeToggle />
<SettingsMenu buttonClassName="appHeaderSettingsButton" />
<Localized id="AppHeader--github-icon" attrs={{ title: true }}>
<a
className="appHeaderGithubIcon"
Expand Down
67 changes: 0 additions & 67 deletions src/components/app/FooterLinks.css

This file was deleted.

68 changes: 0 additions & 68 deletions src/components/app/FooterLinks.tsx

This file was deleted.

7 changes: 2 additions & 5 deletions src/components/app/LanguageSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ export function LanguageSwitcher(): React.ReactNode {
}

return (
<Localized
id="FooterLinks--languageSwitcher--select"
attrs={{ title: true }}
>
<Localized id="SettingsMenu--language-switcher" attrs={{ title: true }}>
<select
className="appFooterLinksLanguageSwitcher"
className="settingsMenuLanguageSwitcher"
onChange={onLocaleChange}
value={primaryLocale}
>
Expand Down
11 changes: 2 additions & 9 deletions src/components/app/MenuButtons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
/* Note: the order of import is important, from most general to most specific,
* so that the CSS rules are in the correct order. */
import { ButtonWithPanel } from 'firefox-profiler/components/shared/ButtonWithPanel';
import { SettingsMenu } from 'firefox-profiler/components/app/SettingsMenu';
import { MetaInfoPanel } from './MetaInfo';
import { PublishPanel } from './Publish';
import { MenuButtonsPermalink } from './Permalink';
Expand Down Expand Up @@ -334,15 +335,7 @@ class MenuButtonsImpl extends React.PureComponent<Props, State> {
{this._renderMetaInfoButton()}
{this._renderPublishPanel()}
{this._renderPermalink()}
<a
href="/docs/"
target="_blank"
className="menuButtonsButton menuButtonsButton-hasLeftBorder"
title="Open the documentation in a new window"
>
<Localized id="MenuButtons--index--docs">Docs</Localized>
<i className="open-in-new" />
</a>
<SettingsMenu buttonClassName="menuButtonsButton menuButtonsButton-hasIcon menuButtonsButton-hasLeftBorder menuButtonsSettingsButton" />
</>
);
}
Expand Down
2 changes: 0 additions & 2 deletions src/components/app/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { PureComponent } from 'react';
import { Localized } from '@fluent/react';
import { Provider } from 'react-redux';
import { UrlManager } from './UrlManager';
import { FooterLinks } from './FooterLinks';
import {
NonLocalizedErrorBoundary,
LocalizedErrorBoundary,
Expand Down Expand Up @@ -44,7 +43,6 @@ export class Root extends PureComponent<RootProps> {
<ServiceWorkerManager />
<ProfileLoader />
<AppViewRouter />
<FooterLinks />
<WindowTitle />
</UrlManager>
</DragAndDrop>
Expand Down
114 changes: 114 additions & 0 deletions src/components/app/SettingsMenu.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

.settingsMenu {
--internal-cog-icon: url(../../../res/img/svg/cog-12.svg);
}

:root.dark-mode {
.settingsMenu {
--internal-cog-icon: url(../../../res/img/svg/cog-light-12.svg);
}
}

.menuButtonsSettingsButton::before {
padding-right: 0;
background-image: var(--internal-cog-icon);
}

.appHeaderSettingsButton {
display: inline-flex;
width: 24px;
height: 24px;
align-items: center;
justify-content: center;
padding: 0;
border: 0;
background: none;
color: inherit;
cursor: pointer;
transition: opacity 250ms var(--animation-curve);
}

.appHeaderSettingsButton::before {
display: block;
width: 22px;
height: 22px;
background: var(--internal-cog-icon) no-repeat center / 22px;
content: '';
}

.appHeaderSettingsButton:hover {
opacity: 0.5;
}

/* Override the ArrowPanel's default 60px right-offset - the cog sits at the
* far right of the top bar, so any larger offset overflows the viewport. */
.settingsMenuArrowPanel {
--offset-from-right: 12px;

min-width: 200px;
}

.settingsMenuArrowPanel .arrowPanelContent {
padding: 0;
}

.settingsMenuPanel {
display: flex;
flex-direction: column;
font-size: 13px;
font-weight: normal;
line-height: 1.3;
}

.settingsMenuRow {
display: flex;
align-items: center;
justify-content: center;
padding: 10px 14px;
}

.settingsMenuLinks {
display: flex;
flex-direction: column;
align-items: stretch;
padding: 4px 0;
border-top: 1px solid var(--base-border-color);
border-bottom: 1px solid var(--base-border-color);
}

.settingsMenuLink {
display: flex;
align-items: center;
padding: 6px 14px;
font-weight: 600;
}

.settingsMenuLink,
.settingsMenuLink:visited {
color: var(--base-foreground-color);
text-decoration: none;
}

.settingsMenuLink:hover {
background-color: rgb(0 0 0 / 0.06);
text-decoration: none;
}

:root.dark-mode .settingsMenuLink:hover {
background-color: rgb(255 255 255 / 0.08);
}

.settingsMenuLanguageSwitcher {
flex: 1;
color: inherit;
font: inherit;
}

:root.dark-mode .settingsMenuLanguageSwitcher {
border: 1px solid var(--grey-40);
border-radius: 4px;
background: var(--grey-60);
}
Loading
Loading