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

fix: memory lane assets in ascending order #8309

Merged
merged 4 commits into from Mar 27, 2024
Merged

fix: memory lane assets in ascending order #8309

merged 4 commits into from Mar 27, 2024

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Mar 27, 2024

  • fixes Memories are shown in reversed order #8275
  • return assets in ascending order
  • return groups in ascending order (1 year, 2 years, etc.)
  • refactor group logic to use a map instead of lodash chaining (easier to read)
  • map asset and generate year string as the last operation
  • deprecate the response.title (client can do this using translations and yearsAgo)

Copy link

cloudflare-pages bot commented Mar 27, 2024

Deploying immich with  Cloudflare Pages  Cloudflare Pages

Latest commit: aebc5a6
Status: ✅  Deploy successful!
Preview URL: https://3ffc8cbc.immich.pages.dev
Branch Preview URL: https://fix-8275.immich.pages.dev

View logs

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

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

Nice!

@jrasm91 jrasm91 merged commit 9fe80c2 into main Mar 27, 2024
24 of 25 checks passed
@jrasm91 jrasm91 deleted the fix/8275 branch March 27, 2024 20:14
@@ -131,7 +131,9 @@ export function mapAsset(entity: AssetEntity, options: AssetMapOptions = {}): As
}

export class MemoryLaneResponseDto {
@ApiProperty({ deprecated: true })
title!: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

My initial thought for this property is that we will have more categories, not just x year ago, but perhaps the best shots of the month...etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't work very well with translations though. I think sending back text in an API always gets complicated when dealing with i18n. We can probably add a type field if we start supporting another category of memories.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Basically metadata and types are probably the easy to go and the clients can translate it into titles

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memories are shown in reversed order
3 participants