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
9 changes: 5 additions & 4 deletions locales/en-US/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ MenuButtons--index--metaInfo-button =

MenuButtons--index--full-view = Full View
MenuButtons--index--cancel-upload = Cancel Upload
MenuButtons--index--download =
.label = Download…
MenuButtons--index--save =
.label = Save…

MenuButtons--index--share =
.label = Share…
Expand Down Expand Up @@ -763,7 +763,8 @@ MenuButtons--publish--renderCheckbox-label-argument-values-warning-image =
.title = This profile contains function argument values recorded from the page, which may include personal data
MenuButtons--publish--share-performance-profile = Share Performance Profile
MenuButtons--publish--reshare-performance-profile = Re-share Performance Profile
MenuButtons--publish--download-performance-profile = Download Performance Profile
MenuButtons--publish--save-performance-profile = Save Performance Profile
MenuButtons--publish--persistence-description = Profiles are not saved automatically. To keep a profile, save it to your computer or upload it using Share.
MenuButtons--publish--info-description = Upload your profile and make it accessible to anyone with the link.
MenuButtons--publish--download-info-description = Save this profile as a file on your computer.
MenuButtons--publish--info-description-default = By default, your personal data is removed.
Expand All @@ -774,7 +775,7 @@ MenuButtons--publish--upload-title = Uploading profile…
MenuButtons--publish--cancel-upload = Cancel Upload
MenuButtons--publish--message-something-went-wrong = Uh oh, something went wrong when uploading the profile.
MenuButtons--publish--message-try-again = Try again
MenuButtons--publish--download = Download
MenuButtons--publish--save = Save
MenuButtons--publish--compressing = Compressing…
MenuButtons--publish--error-while-compressing = Error while compressing, try unchecking some checkboxes to reduce the profile size.

Expand Down
14 changes: 10 additions & 4 deletions src/components/app/MenuButtons/Publish.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ class PublishPanelImpl extends React.PureComponent<PublishProps, {}> {
let title;
if (isDownload) {
title = (
<Localized id="MenuButtons--publish--download-performance-profile">
Download Performance Profile
<Localized id="MenuButtons--publish--save-performance-profile">
Save Performance Profile
</Localized>
);
} else if (isRepublish) {
Expand All @@ -167,6 +167,12 @@ class PublishPanelImpl extends React.PureComponent<PublishProps, {}> {
onSubmit={isDownload ? undefined : this._onSubmit}
>
<h1 className="publishPanelTitle photon-title-30">{title}</h1>
<Localized id="MenuButtons--publish--persistence-description">
<p className="publishPanelInfoDescription">
Profiles are not saved automatically. To keep a profile, save it
to your computer or upload it using Share.
</p>
</Localized>
<p className="publishPanelInfoDescription">
{isDownload ? (
<Localized id="MenuButtons--publish--download-info-description">
Expand Down Expand Up @@ -469,7 +475,7 @@ class DownloadButton extends React.PureComponent<DownloadButtonProps, {}> {
className={className}
>
<span className="publishPanelButtonsSvg publishPanelButtonsSvgDownload" />
<Localized id="MenuButtons--publish--download">Download</Localized>{' '}
<Localized id="MenuButtons--publish--save">Save</Localized>{' '}
<span className="menuButtonsDownloadSize">
({prettyBytes(profileData.size)})
</span>
Expand All @@ -479,7 +485,7 @@ class DownloadButton extends React.PureComponent<DownloadButtonProps, {}> {
case 'ERROR': {
return (
<button type="button" className={className} disabled>
<Localized id="MenuButtons--publish--download">Download</Localized>
<Localized id="MenuButtons--publish--save">Save</Localized>
</button>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/app/MenuButtons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class MenuButtonsImpl extends React.PureComponent<Props, State> {

return (
<>
<Localized id="MenuButtons--index--download" attrs={{ label: true }}>
<Localized id="MenuButtons--index--save" attrs={{ label: true }}>
<ButtonWithPanel
buttonClassName="menuButtonsButton menuButtonsDownloadButton menuButtonsButton-hasIcon"
panelClassName="publishPanelPanel"
Expand Down
16 changes: 8 additions & 8 deletions src/test/components/MenuButtons.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ describe('app/MenuButtons', function () {
fireFullClick(getPublishButton());
await screen.findByText(/^(Share|Re-share) Performance Profile$/);
};
// The Download button opens the same panel but with the Download CTA.
// The Save button opens the same panel but with the Save CTA.
const openDownloadPanel = async () => {
fireFullClick(screen.getByText('Download…'));
await screen.findByText('Download Performance Profile');
fireFullClick(screen.getByText('Save…'));
await screen.findByText('Save Performance Profile');
};

return {
Expand Down Expand Up @@ -320,15 +320,15 @@ describe('app/MenuButtons', function () {
const { profile } = createSimpleProfile('nightly');
const { getPanel, openDownloadPanel } = setupForPublish(profile);
await openDownloadPanel();
await screen.findByRole('link', { name: /Download/ });
await screen.findByRole('link', { name: /Save/ });
expect(getPanel()).toMatchSnapshot();
});

it('matches the snapshot for the opened panel for a release profile', async () => {
const { profile } = createSimpleProfile('release');
const { getPanel, openDownloadPanel } = setupForPublish(profile);
await openDownloadPanel();
await screen.findByRole('link', { name: /Download/ });
await screen.findByRole('link', { name: /Save/ });
expect(getPanel()).toMatchSnapshot();
});

Expand All @@ -346,7 +346,7 @@ describe('app/MenuButtons', function () {
navigateToHash('VALID_HASH');
expect(container).toMatchSnapshot();
await openDownloadPanel();
await screen.findByRole('link', { name: /Download/ });
await screen.findByRole('link', { name: /Save/ });
expect(getPanel()).toMatchSnapshot();
});

Expand Down Expand Up @@ -519,13 +519,13 @@ describe('app/MenuButtons', function () {
expect(getPanel()).toMatchSnapshot();
});

it('keeps Download available but locks the options while uploading', async () => {
it('keeps Save available but locks the options while uploading', async () => {
const { openPublishPanel, getPanelForm, openDownloadPanel } =
setupForPublish();
await openPublishPanel();
fireEvent.submit(getPanelForm());

// The Download button stays in the toolbar while the upload is running.
// The Save button stays in the toolbar while the upload is running.
await openDownloadPanel();
expect(
screen.getByRole('checkbox', { name: /Include hidden threads/ })
Expand Down
43 changes: 34 additions & 9 deletions src/test/components/__snapshots__/MenuButtons.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ exports[`app/MenuButtons <Publish> can publish and revert 1`] = `
class="buttonWithPanelButton menuButtonsButton menuButtonsDownloadButton menuButtonsButton-hasIcon"
type="button"
>
Download…
Save…
</button>
</div>
<div
Expand Down Expand Up @@ -1887,6 +1887,11 @@ exports[`app/MenuButtons <Publish> matches the snapshot for a compression error
>
Share Performance Profile
</h1>
<p
class="publishPanelInfoDescription"
>
Profiles are not saved automatically. To keep a profile, save it to your computer or upload it using Share.
</p>
<p
class="publishPanelInfoDescription"
>
Expand Down Expand Up @@ -2040,7 +2045,7 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the closed state 1`]
class="buttonWithPanelButton menuButtonsButton menuButtonsDownloadButton menuButtonsButton-hasIcon"
type="button"
>
Download…
Save…
</button>
</div>
<div
Expand Down Expand Up @@ -2088,7 +2093,7 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the menu buttons and
class="buttonWithPanelButton menuButtonsButton menuButtonsDownloadButton menuButtonsButton-hasIcon"
type="button"
>
Download…
Save…
</button>
</div>
<div
Expand Down Expand Up @@ -2136,8 +2141,13 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the menu buttons and
<h1
class="publishPanelTitle photon-title-30"
>
Download Performance Profile
Save Performance Profile
</h1>
<p
class="publishPanelInfoDescription"
>
Profiles are not saved automatically. To keep a profile, save it to your computer or upload it using Share.
</p>
<p
class="publishPanelInfoDescription"
>
Expand Down Expand Up @@ -2225,7 +2235,7 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the menu buttons and
<span
class="publishPanelButtonsSvg publishPanelButtonsSvgDownload"
/>
Download
Save

<span
class="menuButtonsDownloadSize"
Expand All @@ -2250,8 +2260,13 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the opened panel for
<h1
class="publishPanelTitle photon-title-30"
>
Download Performance Profile
Save Performance Profile
</h1>
<p
class="publishPanelInfoDescription"
>
Profiles are not saved automatically. To keep a profile, save it to your computer or upload it using Share.
</p>
<p
class="publishPanelInfoDescription"
>
Expand Down Expand Up @@ -2344,7 +2359,7 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the opened panel for
<span
class="publishPanelButtonsSvg publishPanelButtonsSvgDownload"
/>
Download
Save

<span
class="menuButtonsDownloadSize"
Expand All @@ -2369,8 +2384,13 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the opened panel for
<h1
class="publishPanelTitle photon-title-30"
>
Download Performance Profile
Save Performance Profile
</h1>
<p
class="publishPanelInfoDescription"
>
Profiles are not saved automatically. To keep a profile, save it to your computer or upload it using Share.
</p>
<p
class="publishPanelInfoDescription"
>
Expand Down Expand Up @@ -2458,7 +2478,7 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the opened panel for
<span
class="publishPanelButtonsSvg publishPanelButtonsSvgDownload"
/>
Download
Save

<span
class="menuButtonsDownloadSize"
Expand All @@ -2485,6 +2505,11 @@ exports[`app/MenuButtons <Publish> matches the snapshot for the opened share pan
>
Share Performance Profile
</h1>
<p
class="publishPanelInfoDescription"
>
Profiles are not saved automatically. To keep a profile, save it to your computer or upload it using Share.
</p>
<p
class="publishPanelInfoDescription"
>
Expand Down
Loading