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

chore(web): timeline bucketing by day #9935

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
public timeGroup = '';
public date!: DateTime;
public hasLabel = false;
public hasDotIndicator = false;
}

const calculateSegments = (buckets: AssetBucket[]) => {
Expand All @@ -60,6 +61,10 @@
height = 0;
}

if (previous?.date.month !== segment.date.month) {
segment.hasDotIndicator = true;
}

height += segment.height;
previous = segment;
return segment;
Expand Down Expand Up @@ -164,7 +169,7 @@
>
{segment.date.year}
</div>
{:else if segment.height > 5}
{:else if segment.height > 5 && segment.hasDotIndicator}
<div
aria-label={segment.timeGroup + ' ' + segment.count}
class="absolute right-0 mr-3 block h-[4px] w-[4px] rounded-full bg-gray-300"
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/stores/assets.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class AssetStore {
options: AssetStoreOptions,
private albumId?: string,
) {
this.options = { ...options, size: TimeBucketSize.Month };
this.options = { ...options, size: TimeBucketSize.Day };
this.store$.set(this);
}

Expand Down
Loading