Skip to content
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

PMM-13472: Update Popup - Wording improvements #789

Open
wants to merge 1 commit into
base: v3
Choose a base branch
from
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
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const Messages = {
titleOneUpdate: 'New update available',
titleMultipleUpdates: 'New updates available',
howToUpdate: 'How to update',
howToUpdateDescription:
"We are inaugurating a new process for updating PMM. It's a new interface with an improved user experience and is ready for the future of PMM. Click on Go to Updates Page to find out more.",
newVersions: 'New Versions',
readMore: 'Read more',
fullReleaseNotes: 'Full release notes here',
goToUpdatesPage: 'Go to updates page',
snooze: 'Dismiss',
readyForAnUpdate: 'Ready for an upgrade?',
updateDescription:
"We've streamlined our update process with a new, user-friendly interface. One click gets you all the latest improvements.",
};
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ export const getStyles = ({ v1: { spacing, colors, typography } }: GrafanaTheme2
color: ${colors.textBlue};
},
`,
readyForUpdate: css`
margin-top: 10px;
`,
});
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ const PerconaUpdateVersion = () => {
{Messages.fullReleaseNotes}
</a>
</p>
<h5>{Messages.howToUpdate}</h5>
<p>{Messages.howToUpdateDescription}</p>
<h5 className={styles.readyForUpdate}>{Messages.readyForAnUpdate}</h5>
<span>{Messages.updateDescription}</span>
<div className={styles.updateButtons}>
<Button type="button" variant="secondary" onClick={snoozeUpdate} className={styles.snoozeButton}>
{Messages.snooze}
Expand Down Expand Up @@ -97,8 +97,8 @@ const PerconaUpdateVersion = () => {
</li>
))}
</ul>
<h5 className={styles.howToUpdate}>{Messages.howToUpdate}</h5>
<p>{Messages.howToUpdateDescription}</p>
<h5 className={styles.readyForUpdate}>{Messages.readyForAnUpdate}</h5>
<span>{Messages.updateDescription}</span>
<div className={styles.updateButtons}>
<Button type="button" variant="secondary" onClick={snoozeUpdate} className={styles.snoozeButton}>
{Messages.snooze}
Expand Down
16 changes: 9 additions & 7 deletions public/app/percona/shared/core/reducers/updates/updates.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ export const responseToPayload = (response: CheckUpdatesResponse): CheckUpdatesP
});

export const mapUpdatesChangeLogs = (response: CheckUpdatesChangeLogsResponse): CheckUpdatesChangeLogs => {
const responseMapping = response.updates.map((item) => ({
version: item.version,
tag: item.tag,
timestamp: item.timestamp,
releaseNotesUrl: item.release_notes_url,
releaseNotesText: item.release_notes_text,
}));
const responseMapping = response.updates
.map((item) => ({
version: item.version,
tag: item.tag,
timestamp: item.timestamp,
releaseNotesUrl: item.release_notes_url,
releaseNotesText: item.release_notes_text,
}))
.sort((firstItem, nextItem) => nextItem.version.localeCompare(firstItem.version, undefined, { numeric: true }));
return {
lastCheck: response.last_check,
updates: responseMapping,
Expand Down
Loading