-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
UI: New share button and toolbar reorganize #77563
Conversation
Blocked until we implement tracking in the toolbar actions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and LGTM
@evictorero Something I just thought is that we should make sure no docs need to be updated (or that they get updated if needed), we may be using some screenshots that need to be renewed. |
We will wait a few days to collect analytics data from the old button before merge this one. I don't think we update screenshots in our docs for these small changes do we? In any case, this will change a lot over the next weeks/months maybe we can wait until a more refined version? |
I actually don't know :) @imatwawana any thoughts? |
You can probably hold off on updating screenshots if there are going to be several changes, but the text should be updated as elements get changed. So the docs where we refer to the "sharing icon" should be updated along with this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
As we discussed, I'm a little worried about the button padding and height, which is not the same as in the design.
I agree we shouldn't customize the CSS as it was before, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -332,7 +309,33 @@ export const DashNav = React.memo<Props>((props) => { | |||
); | |||
} | |||
|
|||
addCustomContent(dynamicDashNavActions.right, buttons); | |||
if (canEdit && !isFullscreen) { | |||
if (config.featureToggles.emptyDashboardPage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this condition since the toggle is enabled to 100% by default 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I searched for this flag and it is being used in more places, I prefer to leave it here to be removed by a cleanup PR.
@@ -360,3 +363,9 @@ const modalStyles = css({ | |||
width: 'max-content', | |||
maxWidth: '80vw', | |||
}); | |||
|
|||
const publicBadgeStyle = css({ | |||
color: 'grey', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we use grey
as color, or event transparent
? Blue is confusing 😓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use grey
on this line 🤔. If you are talking about the original <Badge
line it is using blue
because it is one of the valid colors required by BadgeComponent
https://github.com/grafana/grafana/blob/329ec2624a514afa0c042800a00341fdc811e068/packages/grafana-ui/src/components/Badge/Badge.tsx#L14```
I don't like it, but I don't know how to fix it and it should be temporary until we replace it with the new Badge component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
What is this feature?
Changes style of the public dashboard badge, the add and share button and reorganize toolbar buttons.
Before
![image](https://private-user-images.githubusercontent.com/20256983/294291779-9999c00a-fcfd-4f87-8f13-aaacefc20eab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAyNTU3MDYsIm5iZiI6MTcyMDI1NTQwNiwicGF0aCI6Ii8yMDI1Njk4My8yOTQyOTE3NzktOTk5OWMwMGEtZmNmZC00Zjg3LThmMTMtYWFhY2VmYzIwZWFiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA2VDA4NDMyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcwZDgyNGQxOWQ2YjM3NTE3NDRlMjk1ZDFhNTUyMTE3NmY0OTU2ZGMzNGJkMDhkYjI2YTY3NzQ0YjRmMDUzMGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.H_sdGMa9lyR3nqeceem77GHOfaqEKHj0aoFAX4JM-6M)
Now
![image](https://private-user-images.githubusercontent.com/20256983/292205816-b96f5e6d-99d3-41b3-8e93-c6945b533726.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAyNTU3MDYsIm5iZiI6MTcyMDI1NTQwNiwicGF0aCI6Ii8yMDI1Njk4My8yOTIyMDU4MTYtYjk2ZjVlNmQtOTlkMy00MWIzLThlOTMtYzY5NDViNTMzNzI2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA2VDA4NDMyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE0NjViYTMwMDVkYzIyNTk3ZGU0YWI2ZDk2MjEwOTA3YTE0NjY1NWZkMmVkZjAyYThjMDJhZDYwYWQ2MWRjYzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.39Yo3FxURA3IBj7H-wim7SLiY_GdleEQZUyx6wDZYbE)
![image](https://private-user-images.githubusercontent.com/20256983/292205968-467e6e50-55e4-4632-8334-5ccac73208eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAyNTU3MDYsIm5iZiI6MTcyMDI1NTQwNiwicGF0aCI6Ii8yMDI1Njk4My8yOTIyMDU5NjgtNDY3ZTZlNTAtNTVlNC00NjMyLTgzMzQtNWNjYWM3MzIwOGViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA2VDA4NDMyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWIyYTUwODg3MGEyY2FjYjkyMjlmN2ZhYTVjODBmM2Q2YmQ1ODZkYzY5OTcyOGVlZTJkYmY2ZTg3NTViODQzMmUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._n-xYdNCbM3yEla3G6bwtMsQrBMNID4jNnZDUmNQAkU)
Which issue(s) does this PR fix?:
Fixes #77298
Fixes #71539
Special notes for your reviewer:
This is the first step of toolbar redesign, more info here
Please check that: