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

feat: Print version on document #2485

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

feat: Print version on document #2485

wants to merge 6 commits into from

Conversation

flob38
Copy link
Contributor

@flob38 flob38 commented Jan 20, 2022

To solve #2484

@flob38
Copy link
Contributor Author

flob38 commented Jan 20, 2022

I need some time to work on css
And it would be nice to have some information about the version of the doc (number or date).

It seems this part of the discussion has been forgotten.

@cbeauchesne cbeauchesne mentioned this pull request Jan 24, 2022
@flob38
Copy link
Contributor Author

flob38 commented Jan 24, 2022

Hello.
I'm trying to insert document version with the licence.
I've found 3 versions :/
Exemple : http://localhost:8080/routes/260077/fr/buis-les-baronnies-rocher-saint-julien-le-nez
In the props :

document:Object
    activities:Array[1]
    ...
    cooked:Object
        **version:8**
    ...
    locales:Array[1]
        0:Object
            **version:8**
    ...
    rock_types:Array[1]
    route_types:Array[1]
    type:"r"
    **version:5**

It seems that the good one is the one in cooked or locales, but why do the third is different from the others ?
And which one (cooked or locales) should I use ?

@cbeauchesne
Copy link
Member

The version=5 is for the non-locales data (height, ratings ....). The version=8 is for the locales data (description, summary...).

I would say both values are needed. If it's not possible, the locale one (version=8) is more the one to go.

@brunobesson
Copy link
Member

brunobesson commented Jan 25, 2022

Anyway, wouldn't the most relevant value be the datetime of the last of both revisions?

@flob38
Copy link
Contributor Author

flob38 commented Jan 26, 2022

That's right but it needs a modification of API no ?
Anyway, if you're ok with that, I'll create a revision-box which would indicate max of revision number. It could be upgraded with date when API will be ok.

@brunobesson
Copy link
Member

Ok with this, if you have checked that both numbers are related, not independant.

@flob38 flob38 requested a review from cbeauchesne March 4, 2022 23:59
@brunobesson
Copy link
Member

I did a check. Both version numbers (for locale and 'global') are incremented independently. So the version number you provide is not valid, we need to be able to retrieve dates and compare them to state that this is the version of that date.
Despite your work and efforts, to me this is a no go until API is updated 🙁

@cbeauchesne cbeauchesne removed their request for review October 25, 2023 08:57
@flob38 flob38 marked this pull request as draft July 18, 2024 09:15
@flob38 flob38 changed the title Print licence on document feat: Print version on document Jul 18, 2024
@github-actions github-actions bot added the enhancement New feature or request label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants