Skip to content

Conversation

@Carbrex
Copy link
Member

@Carbrex Carbrex commented Jan 4, 2024

Show dates and times instead of time ago on dedicated feed page (lichess.org/feed) #14348

@kraktus
Copy link
Member

kraktus commented Jan 4, 2024

Hey, thanks for the PR! I don't think we need the time

@Carbrex
Copy link
Member Author

Carbrex commented Jan 4, 2024

Ok, shall I discard the PR then?

@schlawg
Copy link
Contributor

schlawg commented Jan 4, 2024

No just delete the part in parens and UTC, and look at app/templating/DateHelper for examples of how to format dates without java code.

@schlawg
Copy link
Contributor

schlawg commented Jan 4, 2024

Including HH:MM is good, sometimes there are many updates in a day and it will be weird to see three headers for the same date with nothing to differentiate them in a list.

@Carbrex
Copy link
Member Author

Carbrex commented Jan 4, 2024

Oh I see what Sol's objection was. We absolutely do not want dates on the homepage. The homepage is fine. This is for https://lichess.org/feed which is a separate page. I apologize if I was not clear in the issue though to be fair I did state it twice in the short form of the issue.

Actually, the changes I made only affects lichess.org/feed and not the home page
image
This is the home page
image
This is lichess.org/feed

No just delete the part in parens and UTC, and look at app/templating/DateHelper for examples of how to format dates without java code.

Do you mean parenthesis? Sorry for being dumb
Also, I need one help Is there a default password for the mongo db page in the gitpod settings Coz I didn't initialize it and I am failing to access it.

@schlawg
Copy link
Contributor

schlawg commented Jan 4, 2024

Yes parens is short for parentheses. Not sure about gitpod but if you ask on our discord, the guy who made our gitpod integration watches general-programming-chat and lichess-dev-onboarding pretty closely.

@Carbrex
Copy link
Member Author

Carbrex commented Jan 4, 2024

image
Thanks for your help @schlawg

@fitztrev fitztrev changed the title Fix #14348 Show dates on dedicated feed page Jan 4, 2024
@ornicar
Copy link
Collaborator

ornicar commented Jan 5, 2024

It used to be translated to the viewer's language, now all the dates are just in english.

@Carbrex
Copy link
Member Author

Carbrex commented Jan 5, 2024

It used to be translated to the viewer's language, now all the dates are just in english.

So, do I need to change anything in my pr?

@schlawg
Copy link
Contributor

schlawg commented Jan 5, 2024

DateHelper.scala to the rescue

@Carbrex
Copy link
Member Author

Carbrex commented Jan 5, 2024

DateHelper.scala to the rescue

But what do I need to change?

@Carbrex
Copy link
Member Author

Carbrex commented Jan 5, 2024

image
Thanks for your help @schlawg

This is how it looks right now. What is the change to be done in this? Please help.

@kraktus
Copy link
Member

kraktus commented Jan 5, 2024

Try showInstant instead of showEnglishInstant

@Carbrex
Copy link
Member Author

Carbrex commented Jan 5, 2024

Try showInstant instead of showEnglishInstant

Sorry, I didn't mean to know the code change I just couldn't get what functionality needs to be changed(I didn't understand Ornicar's msg). I have now made the required changes.
Thanks for the help though!
Also sorry for three commits for a single code change was my first time working with scala code.

@kraktus
Copy link
Member

kraktus commented Jan 5, 2024

If you change your Lichess language, the date should be translated accordingly, whereas using englishinstant meant it’d always be formatted with the english style

@ornicar ornicar merged commit 8681f2b into lichess-org:master Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants