Coder Social home page Coder Social logo

Comments (5)

bpatrik avatar bpatrik commented on June 12, 2024 2

I did some reading and put some thoughts in it:

Adobe rejected is special case with special UI feature ( Lightroom set a the photo gray and adds a black flag. I usually use it to virtually delete the photo). Lightroom supports also an inverse rejected flag, which is 'picked' and has a white flag as UI indicator.

On a separate UI surface Lightroom supports rating between 1-5 and non-rating. ( this also agrees with documentation that you also referenced).

Scanning through this https://exiftool.org/forum/index.php?topic=3567.0, it seems to me xmp rating is very much not standard and eg. Windows does support rating.

It looks to me rejected is Lightroom specific only ( I could not find anywhere else). I don't think pigallery2 should be an other UI for Lightroom.

+1 each metadata info (that is sent to the client side, like rating) linearly increases the gallery ( each folder/search) load time.

Based on this I think rating should work as follows:

  • Undefined, null and 0 are equivalent and metadat.rating should not be set.
    • searching for 0 rating should list all of these photos
  • Valid ratings are 1-5. UI only shows rating if its between 1-5.
  • -1 mapped to 0

That said:
I don't mind if you would like to support rejected, but UI should also reflect it.

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024 2

Thanks. I'm fine with this. It's an edge case with -1 anyway. I just like specification and it appears that a lot of this xmp-stuff is adobe's invention. However, when the bulk of support is for 1-5 (and 0), no reason to let pigallery suffer from that. Especially if it can impact performance :)

I'll close the question, but it's a good reference for later.

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024 2

Closing the question with the current state being as described below:

Based on this I think rating should work as follows:

* Undefined,  null and 0 are equivalent  and  metadat.rating should not be set.
  
  * searching for 0 rating should list all of these photos

* Valid ratings are 1-5. UI only shows rating if its between 1-5.

* -1 mapped to 0

from pigallery2.

bpatrik avatar bpatrik commented on June 12, 2024 1

I think for now the app support rating of 0 to 5 and undefined (null in db). If null nothing is shown on the UI otherwise the given numbers of starts.

I'm only mediumly certain about this, need to double-check. (Null and 0 maybe handled the same way, which is probably a bug)

I don't mind if we change this, but then grouping, sorting and searching should be updated and kept consistent. ( Preferably in one PR).

In Adobe case what is the difference between rejected and unrated?

Or reverted is when you hit 'x' and the photo turns gray in Lightroom?
That sounds to me a Lightroom specific UI feature and I think pg2 should not follow it, unless it's a more widely adopted feature.

Answer 2:

That mapping sounds more or less good to me.

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

I'm only mediumly certain about this, need to double-check. (Null and 0 maybe handled the same way, which is probably a bug)

There was a recent PR, where actual 0 values were treated like not present. So if a value 0 was read from actual metadata, the pigallery metadata would show nothing. The opposite of what the spec says:
If xmp:Rating is not present, a value of 0 should be assumed

I don't mind if we change this, but then grouping, sorting and searching should be updated and kept consistent. ( Preferably in one PR).

Ok, I don't think there is a lot of impact here. The only new value is -1.

In Adobe case what is the difference between rejected and unrated?

-1 (rejected): someone viewed it and found it bad (maybe bad quality, or maybe they use it for filtering)
0 (not rated): noone viewed it, or if they did, they didn't care to give it a rating.

Or reverted is when you hit 'x' and the photo turns gray in Lightroom? That sounds to me a Lightroom specific UI feature and I think pg2 should not follow it, unless it's a more widely adopted feature.

I have no clue how Lightroom works, I just read the spec and the spec says values -1, 0, 1, 2, 3, 4, 5 are valid. So I thought it would be suitable to represent them faithfully. It doesn't mean pigallery needs to represent -1's in any particular way. It's just data :) . And of course, in the end, you're the boss ;)

Answer 2:
That mapping sounds more or less good to me.

Cool. I'll work on that. Did some of it already, but will create some extra test-data.

from pigallery2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.