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

Allows float values for gallery article order #1193

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

AlexandreSajus
Copy link
Contributor

Currently, articles in the gallery are sorted according to an integer value in the header of the article:
image

Since the values are integers, adding an article between two articles forces contributors to modify the order value of many articles: if I want to place an article at position 6, I must take all articles from position 6 to N and increment their order by 1.

By accepting float values for order, we allow contributors to place an article at position 6 by setting the order at 6.5

@AlexandreSajus AlexandreSajus added 📈 Improvement Improvement of a feature. 📄 Documentation Internal or public documentation 🟨 Priority: Medium Not blocking but should be fixed soon labels Nov 4, 2024
@AlexandreSajus AlexandreSajus self-assigned this Nov 4, 2024
@FlorianJacta
Copy link
Member

Did you build the doc with this too?

@AlexandreSajus
Copy link
Contributor Author

Yes, and it works. I added a demo in #1194 with order: 11.5 and it placed it between the 11th and the 12th article

Copy link
Member

@FlorianJacta FlorianJacta left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexandreSajus AlexandreSajus merged commit 6efe5d3 into develop Nov 4, 2024
1 check passed
@AlexandreSajus AlexandreSajus deleted the allow_float_order branch November 4, 2024 14:58
@jrobinAV
Copy link
Member

jrobinAV commented Nov 4, 2024

Lovely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 Documentation Internal or public documentation 📈 Improvement Improvement of a feature. 🟨 Priority: Medium Not blocking but should be fixed soon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants