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

Display app names in update page for app updates #17434

Merged
merged 2 commits into from
Aug 20, 2015

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Jul 7, 2015

Whenever the update page is displayed for apps, show app names instead
of the core update text.

Fixes #16272

  • TODO: add unit test
  • To discuss: should we move getIncompatibleApps and getAppsNeedingUpgrade to the IAppManager interface ? I'd rather keep them private but "apps.php" is horribly static... @icewind1991 @MorrisJobke @nickvergessen @oparoz what do you think ?

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 7, 2015

  • TEST: core update: shows core update page
  • TEST: app update alone: shows app update page
  • TEST: core + app update: shows core update page

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 7, 2015

  • TEST: auto-disable third party apps on core update still works

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 7, 2015

Setting to "To review" because I'd like to get comments 😄

@PVince81 PVince81 added this to the 8.2-next milestone Jul 7, 2015
@PVince81 PVince81 self-assigned this Jul 7, 2015
@PVince81
Copy link
Contributor Author

PVince81 commented Jul 7, 2015

Fixes #17437 too, @jancborchardt

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 7, 2015

@jancborchardt I'll revert and fix separately, it's a different piece of code.

@PVince81
Copy link
Contributor Author

Ok looks like nobody objected the last 1.5 months so I'll keep these methods static.

Time for unit tests then.

@PVince81
Copy link
Contributor Author

Basically it looks like this:
versions-app-update

@jancborchardt

@oparoz
Copy link
Contributor

oparoz commented Aug 19, 2015

Regarding the static methods. I don't think app devs would have a use for it, unless they write an app manager?

Regarding the design, I think it would be nice if apps could be shown using bullet points. It makes it clearer what is info-text and what is an app.

@PVince81
Copy link
Contributor Author

I checked the code and remembered why I can't move them easily to the app manager: the app manager is missing methods like "isAppCompatible" and "shouldUpgrade". I don't think we want these on the app manager either.

For the bullet points I'll let @jancborchardt decide.
I think until now we never had bullet points on this page for lists. Another list is the one that shows you what apps are getting disabled during a core update.

@oparoz
Copy link
Contributor

oparoz commented Aug 19, 2015

Another list is the one that shows you what apps are getting disabled during a core update.

Ah, yes, that needs fixing as well because it only shows the folder name iirc.

@PVince81
Copy link
Contributor Author

@oparoz please raise another ticket for that. Thanks.

Whenever the update page is displayed for apps, show app names instead
of the core update text.
@PVince81 PVince81 force-pushed the update-showappnameonappupdate branch from e2d100e to b919ae9 Compare August 19, 2015 16:04
@PVince81
Copy link
Contributor Author

Done.

I moved getIncompatibleApps() and getAppsNeedingUpgrade() to the AppManager class.
I also added AppManager->getAppInfo() that calls the old API to make it mockable for unit tests.

Please review @icewind1991 @nickvergessen @MorrisJobke @Xenopathic @oparoz

@ghost
Copy link

ghost commented Aug 19, 2015

🚀 Test PASSed.🚀
chuck

@@ -1,7 +1,20 @@
<div class="update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>">
<div class="updateOverview">
<?php if ($_['isAppsOnlyUpgrade']) { ?>
Copy link
Member

Choose a reason for hiding this comment

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

Do app upgrades not occur at the same time as core upgrades? If they do, then we should surely display 'The following apps will be updated' alongside 'ownCloud will be updated'?

Copy link
Member

Choose a reason for hiding this comment

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

As far as I can tell (without doing an actual upgrade), we will see:

ownCloud will be updated to version x

External file storage (files_external)
My awesome app (xenopathic_is_awesome)

IMHO we still need to display 'The following apps will be updated' under 'ownCloud will be updated'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I also thought about this.
I'll try and add them to both pages.

@PVince81
Copy link
Contributor Author

  • TODO: add list of apps to upgrade on both core and app upgrade modes

@PVince81
Copy link
Contributor Author

  • TODO: keep warning about backups in both modes

@jancborchardt
Copy link
Member

I agree with @oparoz that it would be nicer to use a list to show the apps. That way they are easily readable and also not center-aligned.

@PVince81
Copy link
Contributor Author

It is already a ul/li list, so I'll switch its CSS style to use bullets instead.
I assume we'll want this for the list of disabled apps too.

  • TODO: add bullets to CSS for "ul" in update page

Apps to update and to disable will always be shown.
Main title changes only when apps need updated, not core.
Added bullet style.
Exclude incompatible apps from updated apps list.
@scrutinizer-notifier
Copy link

A new inspection was created.

@PVince81
Copy link
Contributor Author

Done.
I also changed the wording a bit:
versions-app-update1

Note that the main title changes if a core update is required too.

Also fixed:

  • BUG: if an app needing update is also incompatible, don't show it in the update list

@RobinMcCorkell
Copy link
Member

I'm not 100% sure on the 'Apps update required' wording, but I can't think of any alternatives, and the code looks good 👍

@MorrisJobke
Copy link
Contributor

  • disabled 3rdparty apps aren't listed

@PVince81
Copy link
Contributor Author

@MorrisJobke they are listed after the update. Something to be done separately because it might require changing things in the update order.

@PVince81
Copy link
Contributor Author

Note: the original purpose of this PR is to solve the confusion that people have between core update and app update ("why does my ownCloud suddenly wants to update again ?")

@MorrisJobke
Copy link
Contributor

Then it is working just fine 👍

@ghost
Copy link

ghost commented Aug 20, 2015

🚀 Test PASSed.🚀
chuck

MorrisJobke added a commit that referenced this pull request Aug 20, 2015
Display app names in update page for app updates
@MorrisJobke MorrisJobke merged commit 06d8edd into master Aug 20, 2015
@MorrisJobke MorrisJobke deleted the update-showappnameonappupdate branch August 20, 2015 09:50
@@ -1,12 +1,26 @@
<div class="update" data-productname="<?php p($_['productName']) ?>" data-version="<?php p($_['version']) ?>">
<div class="updateOverview">
<?php if ($_['isAppsOnlyUpgrade']) { ?>
<h2 class="title bold"><?php p($l->t('Apps update required.')); ?></h2>
Copy link
Member

Choose a reason for hiding this comment

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

This should say »App update required« (App without s, no dot at the end.)

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Pull request at #18453

@PVince81 PVince81 mentioned this pull request Aug 21, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't mention the oC version number when upgrading apps
6 participants