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

UX: improve UI of software update page & display more info. #214

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vinothkannans
Copy link
Member

@vinothkannans vinothkannans commented May 2, 2024

This PR will refresh the software update page so that self-hosters can more easily understand the plugins they have installed and which plugins need updates, and so that they are able to quickly and easily update them (or update everything).

Before

Screenshot 2024-05-02 at 9 49 18 AM

After

Screenshot 2024-05-02 at 9 47 35 AM

This PR will refresh the software update page so that self-hosters can more easily understand the plugins they have installed and which plugins need updates, and so that they are able to quickly and easily update them (or update everything).
@martin-brennan martin-brennan self-requested a review May 2, 2024 04:26
Copy link
Contributor

@martin-brennan martin-brennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really great so far 👌

I wonder if we could add a general system spec for this update system? Even if to start with for this PR we made an extremely basic one that navigated us to this page and confirmed the top Discourse row of the update list has the expected version and details. A spec that actually tests the update process itself and also plugin details would be amazing, but it could be quite tricky 🤔

I think we could probably link these commit hashes to their relevant repos too -- just keep them the same grey text style though

2024-05-03_11-20

<h3>{{i18n "admin.docker.update_title"}}</h3>
{{#unless this.outdated}}
<button
disabled={{this.upgradeAllButtonDisabled}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should definitely be changing the code variables and functions from upgrade to update as well, otherwise it is confusing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And CSS classes

@@ -1,62 +1,72 @@
<tr>
<tr class="repo {{if @repo.hasNewVersion 'new-version'}}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please convert this component to a .gjs component while you are at it?

/>
</div>
<DButton
@action={{this.upgrade}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another note that all of this upgrade wording in the code and CSS should be changed to update.

return this.plugin.nameTitleized;
}

let name = this.name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just wondering why you need this other stuff? Everything on this page is either Discourse or a plugin isn't it?

get author() {
if (this.plugin) {
return this.plugin.author;
} else if (this.name === "docker_manager") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary -- docker_manager is an official plugin owned by us, so it should do this by default with this.plugin.author:

https://github.com/discourse/discourse/blob/792e66966c3006ec4abe9746d1554a44fcbe0c2c/app/assets/javascripts/admin/addon/models/admin-plugin.js#L88-L94

<div class="updates-heading">
<h3>{{i18n "admin.docker.update_title"}}</h3>
{{#unless this.outdated}}
<button
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use DButton for this? This one has currently got slightly different styling to the Update buttons in the list

@@ -21,6 +21,13 @@ def repos
official: Plugin::Metadata::OFFICIAL_PLUGINS.include?(r.name),
}

plugin = Discourse.visible_plugins.find { |p| p.path == "#{r.path}/plugin.rb" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to be careful with this...the page errors completely on the client if you give it a wrong path:

2024-05-03_11-46

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe this is an existing problem -- either way we should account for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants