nextcloud / gallery

DEPRECATED Gallery app was replaced by Photos
https://github.com/nextcloud/photos
GNU Affero General Public License v3.0
109 stars 58 forks source link

Add selection feature support #328

Closed desaintmartin closed 4 years ago

desaintmartin commented 6 years ago

Fixes: #105

Licence: AGPL

Description

As I am not proficient with the Nextcloud/Gallery codebase/conventions, I'm happy to change whatever is needed (controlers vs views, Files code uses, codestyle, several pull-requests, etc).

Features

Caveats

Tests

Acceptance tests for :

Tested on

pixelipo commented 6 years ago

I'm a bit skeptical about the amount of new JS (internal and especially vendor) added to Gallery, but I'm not sure what is the official policy of @nextcloud/javascript regarding this.

oparoz commented 6 years ago

First of all, absolutely awesome that you've fixed and added acceptance tests :), but I'd like to ask you to move the fixes to a separate PR in order to not mix too many things in this one. Then you could rebase this PR on top of the fixes.

Now for the PR itself, it may take me a while to get back to you, but I'm hoping the community will help review your work.

desaintmartin commented 6 years ago

Regarding amount of new JS, it really depends on what is the Gallery policy. To be honest, I've brainlessly added what was needed from Files in vendor and wanted to discuss about this with you but with a working feature before discussing. We have 3 possibilities :

About size of code inside of Gallery itself, I am myself surprised of the amount it needed to be implemented, but once again I kept the logic used in Files to do the same thing (and promised myself when I took this issue a few weeks back to finish it whatever it takes. Stupid me).

Acceptance testing : I'll then create another PR this evening to split it up.

pixelipo commented 6 years ago

Aah, in that case, I would suggest using JS addClass/removeClass.

Loading icon has recently been moved to CSS anyway

desaintmartin commented 6 years ago

@pixelipo, I've pushed a new commit to the PR addressing the CSS issue, if you are happy with it I can squash it.

desaintmartin commented 6 years ago

Hello, I've squashed the commit for readability. As a side effect, we need one less file from Files.

Once again, I'm ready to adapt my code for any existing convention/policy in use in Gallery / Nextcloud, see my previous posts for examples.

MorrisJobke commented 6 years ago

@oparoz Please have a look at this.

desaintmartin commented 6 years ago

Hello, Any news on this?

MorrisJobke commented 6 years ago

cc @nextcloud/designers @danxuliu @oparoz for review

oparoz commented 6 years ago

So here are my initial questions:

desaintmartin commented 6 years ago

1/ https://github.com/nextcloud/gallery/pull/328/files#diff-40feb0f13355b6f24487bc09704407e0L10 shows that the same merged.json (used for the not-public part) was used even for the public part and a quick search for "merged" tends to confirm that. Maybe different some file was used before but I haven't seen anything like that lately. 2/ Ok, I will extract the needed functions in that file, I'll try to do it soon.

desaintmartin commented 6 years ago

Hello, waiting for https://github.com/nextcloud/gallery/issues/403 to be solved so that tests can pass regarding public view (and hopefully no change to do in my code once it gets solved). I've spent quite a long time hunting intermitent test failures, it should be okay now. Having two different acceptance test systems for local and CI causes some headaches, it may be interesting to change so that both use the same. I've put the necessary Files-related functions into files-helper.js. The FileSummary object still have size and directory related stats that I don't use, but adding support for this in Gallery may be a good next step so I kept it.

I've also changed a few things here and there in the tests and in excluded files, tell me if it fits you.

Tell me if it looks good so that I'll squash the last commit into the main one.

desaintmartin commented 6 years ago

Now that it is all green, do you agree with the latest two commits (and the other ones)? If so, I'll squash them and it'll be good to merge, hopefully.

codecov[bot] commented 6 years ago

Codecov Report

Merging #328 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #328   +/-   ##
=========================================
  Coverage     82.61%   82.61%           
  Complexity      360      360           
=========================================
  Files            38       38           
  Lines          1323     1323           
=========================================
  Hits           1093     1093           
  Misses          230      230

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7c96dc6...3760d5e. Read the comment docs.

desaintmartin commented 6 years ago

Without response, I merged the new commits into the main one. It feels nice to see green everywhere for tests!

desaintmartin commented 6 years ago

Hello, Has this project been temporarily abandoned in favor of the German government project? :)

desaintmartin commented 5 years ago

Hello guys, One year later, is there anybody interested by this feature or should I just drop it?

juliushaertl commented 5 years ago

I'm sorry this has been lying around for that long, I'll look into your changes the next days.

juliushaertl commented 5 years ago

@desaintmartin Sorry, this has somehow slipped under the radar. Could you please rebase your changes to master, since there are some conflicts.

desaintmartin commented 5 years ago

There are a lot of conflicts unfortunately, I'll have a look when I have time.

sjiampojamarn commented 5 years ago

Anything we can do here. This feature is a must; deal breaker.

nickvergessen commented 4 years ago

The gallery app has been replaced by the beautiful new app: Nextcloud Photos - :camera_flash: Your memories under your control

Please checkout if your Pull request is still necessary there, and in case create it there or raise an issue for others to copy the change from here.