Skip to content

Commit

Permalink
Design refresh of the top bar with the menubuttons (Merge PR #3029)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienw committed Nov 19, 2020
2 parents 4e49b61 + a876008 commit 144758c
Show file tree
Hide file tree
Showing 26 changed files with 525 additions and 119 deletions.
13 changes: 13 additions & 0 deletions res/img/svg/cloud-dark-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions res/img/svg/cloud-off-dark-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions res/img/svg/link-dark-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions res/img/svg/open-in-new-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions res/img/svg/open-in-new.svg

This file was deleted.

10 changes: 10 additions & 0 deletions res/img/svg/share-dark-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions res/img/svg/sharing-animated-dark-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions res/img/svg/undo-dark-12.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/app/ListOfPublishedProfiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export class ListOfPublishedProfiles extends PureComponent<Props, State> {

if (!profileDataList.length) {
return (
<p className="photon-body-30">No profile has been published yet!</p>
<p className="photon-body-30">No profile has been uploaded yet!</p>
);
}

Expand Down
6 changes: 6 additions & 0 deletions src/components/app/MenuButtons/Permalink.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
* 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/. */

/* This background image builds on the generic styles defined in
* MenuButtons/index.css when using an icon. */
.menuButtonsPermalinkButtonButton::before {
background-image: url(firefox-profiler-res/img/svg/link-dark-12.svg);
}

.menuButtonsPermalinkPanel .arrowPanelContent {
/* Override the default padding for ArrowPanel */
padding: 4px;
Expand Down
3 changes: 1 addition & 2 deletions src/components/app/MenuButtons/Permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ export class MenuButtonsPermalink extends React.PureComponent<Props, State> {
render() {
return (
<ButtonWithPanel
className="menuButtonsPermalinkButton"
buttonClassName="menuButtonsButton"
buttonClassName="menuButtonsButton menuButtonsButton-hasIcon menuButtonsPermalinkButtonButton"
ref={this._takePermalinkButtonRef}
label="Permalink"
initialOpen={this.props.isNewlyPublished}
Expand Down
25 changes: 19 additions & 6 deletions src/components/app/MenuButtons/Publish.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,34 @@
* 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/. */

.menuButtonsAbortUploadButton {
background-color: var(--green-70);
color: #fff;
/* These two background images build on the generic styles defined in
* MenuButtons/index.css when using an icon. */
.menuButtonsShareButtonButton::before {
background-image: url(firefox-profiler-res/img/svg/share-dark-12.svg);
}

.menuButtonsShareButtonOriginal {
background-color: var(--green-70);
color: white;
.menuButtonsShareButtonButton-uploading::before {
background-image: url(firefox-profiler-res/img/svg/sharing-animated-dark-12.svg);
}

.menuButtonsShareButtonError {
background-color: var(--red-60);
color: white;
}

.menuButtonsShareButtonError:hover {
background-color: var(--red-70);
}

.buttonWithPanel.open > .menuButtonsShareButtonError,
.menuButtonsShareButtonError:hover:active {
background-color: var(--red-80);
}

.menuButtonsShareButtonError::before {
background-image: url(firefox-profiler-res/img/svg/error.svg);
}

.menuButtonsPublishPanel {
--width: 510px;
}
Expand Down
10 changes: 5 additions & 5 deletions src/components/app/MenuButtons/Publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class MenuButtonsPublishImpl extends React.PureComponent<PublishProps> {
<div className="menuButtonsPublishIcon" />
<h1 className="menuButtonsPublishTitle">
{isRepublish
? 'Re-publish Performance Profile'
? 'Re-upload Performance Profile'
: 'Share Performance Profile'}
</h1>
<p className="menuButtonsPublishInfoDescription">
Expand Down Expand Up @@ -167,7 +167,7 @@ class MenuButtonsPublishImpl extends React.PureComponent<PublishProps> {
className="photon-button photon-button-primary menuButtonsPublishButton menuButtonsPublishButtonsUpload"
>
<span className="menuButtonsPublishButtonsSvg menuButtonsPublishButtonsSvgUpload" />
Publish
Upload
</button>
</div>
</form>
Expand Down Expand Up @@ -207,7 +207,7 @@ class MenuButtonsPublishImpl extends React.PureComponent<PublishProps> {
>
<div className="menuButtonsPublishUploadTop">
<div className="menuButtonsPublishUploadTitle">
Publishing profile…
Uploading profile…
</div>
<div className="menuButtonsPublishUploadPercentage">
{uploadProgressString}
Expand Down Expand Up @@ -240,7 +240,7 @@ class MenuButtonsPublishImpl extends React.PureComponent<PublishProps> {
_renderErrorPanel() {
const { error, resetUploadState } = this.props;
let message: string =
'There was an unknown error when trying to publish the profile.';
'There was an unknown error when trying to upload the profile.';
if (
error &&
typeof error === 'object' &&
Expand All @@ -259,7 +259,7 @@ class MenuButtonsPublishImpl extends React.PureComponent<PublishProps> {
data-testid="MenuButtonsPublish-container"
>
<div className="photon-message-bar photon-message-bar-error">
Uh oh, something went wrong when publishing the profile.
Uh oh, something went wrong when uploading the profile.
<button
className="photon-button photon-button-micro photon-message-bar-action-button"
type="button"
Expand Down

0 comments on commit 144758c

Please sign in to comment.