Repository navigation
Description
This is some cleanup to avoid the workarounds that we've used in some dialogs to support complex headers. #6032 talked about being able to provide support for passing in a JSX element rather than a plain string, which means we can clean up this custom element:
desktop/app/src/ui/release-notes/release-notes-dialog.tsx
Lines 158 to 175 in b552932
| <Dialog id="release-notes" onDismissed={this.props.onDismissed}> | |
| <DialogHeader title={` `} dismissable={false}> | |
| <div className="release-notes-header"> | |
| <img | |
| className="release-note-graphic-left" | |
| src={ReleaseNoteHeaderLeftUri} | |
| /> | |
| <div className="title"> | |
| <p className="version">Version {release.latestVersion}</p> | |
| <p className="date">{release.datePublished}</p> | |
| </div> | |
| <img | |
| className="release-note-graphic-right" | |
| src={ReleaseNoteHeaderRightUri} | |
| /> | |
| {this.renderCloseButton()} | |
| </div> | |
| </DialogHeader> |
Version: development aka b552932
Testing:
To see this dialog for yourself, build the app in development mode and run it up:
$ yarn
$ yarn build:dev
$ yarn start
With it running, find the Help -> Show Popup -> Release notes menu item:
This will then show the dialog - make a note of how things look to ensure that the cleanup in here doesn't affect the styles.
With that change in place, check out the contents of render() inside app/src/ui/release-notes/release-notes-dialog.tsx. We should be able to remove the <DialogHeader> element and only use props on <Dialog> now to achieve the functionality:
return (
<Dialog
id="release-notes"
title={header} // TODO
onDismissed={this.props.onDismissed}
>
<DialogContent>{contents}</DialogContent>One thing to check while you're in here is that the close icon is positioned in the top-right (like in the original screenshot) - it looks like having a tall header now causes the default dialog styles to change:
These are the header-specific styles for this dialog that you might need to tweak:
desktop/app/styles/ui/dialogs/_release-notes.scss
Lines 11 to 42 in b552932
| .dialog-header { | |
| height: 100px; | |
| .release-notes-header { | |
| display: flex; | |
| flex: 1; | |
| } | |
| .release-note-graphic-left { | |
| margin-right: 20px; | |
| } | |
| .release-note-graphic-right { | |
| margin-left: 20px; | |
| } | |
| .title { | |
| text-align: center; | |
| flex-grow: 1; | |
| .version { | |
| font-size: 14px; | |
| font-weight: var(--font-weight-semibold); | |
| margin-bottom: 0; | |
| } | |
| .date { | |
| font-size: 11px; | |
| color: var(--text-secondary-color); | |
| } | |
| } | |
| } |
But I think you'll need to look at the base styles for the dialog to get this working correctly again.



Activity
alejandronanez commentedon Mar 16, 2019
Hey there!
I'm new to the project and I'd like to help - this seems to be a good issue for beginners, am I right?
If so, can I grab it?
Thanks!
shiftkey commentedon Mar 17, 2019
@alejandronanez go for it!
alejandronanez commentedon Mar 18, 2019
Awesome @shiftkey, I’ll work on this during this week!
Thanks!
alejandronanez commentedon Mar 20, 2019
Hey @shiftkey, I had to attend a family emergency, so I won’t be able to start working on this until early next week. If that doesn’t work for the project, let me know!
Thanks!
shiftkey commentedon Mar 20, 2019
@alejandronanez thanks for the update. I'm going to move this back into the "Available" pile to reflect that this could be picked up by someone else, but feel free to grab it next week when you have time!
alejandronanez commentedon Mar 27, 2019
Hey @shiftkey, I'm available again - since nobody claimed this issue, I'd like to start working on it!
tierninho commentedon Mar 27, 2019
@alejandronanez go for it and big thanks for contributing ✨
alejandronanez commentedon Mar 29, 2019
Hey @shiftkey & @tierninho - I got some questions regarding this issue,
If I understand this correctly, what we want to achieve here is to avoid the usage of
DialogHeaderinside aDialogcomponent, to get to something like this:Is that right?
Also, I want to make sure that you're aware that this would affect other dialogs, are you aware of this? - asking because this issue's title
cleanup custom DialogHeader inside Release NotesIf so, how what are the steps to open the
Merge ConflictsandMergedialogs?Thanks!
shiftkey commentedon Mar 29, 2019
@alejandronanez you're on the right track, but let me see if I can clarify things:
Because we added support for using JSX in the
headerof aDialog, we should be able to just pass indialogHeaderContents(or a tweaked version) and avoid the need to import and wrap it in a<DialogHeader>. Does that clarify things?This is fine - the work to make changes to
Merge ConflictandMerge Branchis tracked in #7043, and we have an open PR #7151 to go with it.xPaw commentedon Nov 10, 2025
this was never fixed and now it blends in even more :)