-
Notifications
You must be signed in to change notification settings - Fork 70
Improve activity feed design #2634
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
Open
jancborchardt
wants to merge
5
commits into
master
Choose a base branch
from
feat/activity-stream-layout
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+142
−56
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6d3f117
refactor(stream): visually hide the redundant activity feed heading
jancborchardt 5edb7e3
fix(stream): keep the scrollbar at the edge of app-content
jancborchardt 29ba2ca
feat(stream): make date headings sticky on scroll
jancborchardt 5a32f75
feat(stream): add whitespace below the end-of-feed message
jancborchardt 694ca9f
chore(assets): Recompile assets
nextcloud-command File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /*! | ||
| * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| import type ActivityModel from '../models/ActivityModel.ts' | ||
|
|
||
| import { shallowMount } from '@vue/test-utils' | ||
| import { describe, expect, it } from 'vitest' | ||
| import moment from '@nextcloud/moment' | ||
| import ActivityGroup from '../components/ActivityGroup.vue' | ||
|
|
||
| /** | ||
| * Build a minimal activities prop. The heading only reads the datetime of the | ||
| * first entry to derive its date label, so the rest can be left out. | ||
| */ | ||
| function mountGroup(datetime: string) { | ||
| return shallowMount(ActivityGroup, { | ||
| props: { activities: [{ id: 1, datetime } as unknown as ActivityModel] }, | ||
| }) | ||
| } | ||
|
|
||
| describe('ActivityGroup heading date label', () => { | ||
| it('labels today as "Today" and exposes the full date as the title', () => { | ||
| const wrapper = mountGroup(moment().toISOString()) | ||
| const heading = wrapper.get('.activity-group__heading') | ||
|
|
||
| expect(heading.text()).toBe('Today') | ||
| expect(heading.attributes('title')).toBe(moment().format('LL')) | ||
| }) | ||
|
|
||
| it('labels the previous day as "Yesterday"', () => { | ||
| const wrapper = mountGroup(moment().subtract(1, 'day').toISOString()) | ||
| const heading = wrapper.get('.activity-group__heading') | ||
|
|
||
| expect(heading.text()).toBe('Yesterday') | ||
| expect(heading.attributes('title')).toBe(moment().subtract(1, 'day').format('LL')) | ||
| }) | ||
|
|
||
| it('labels older days with the formatted date and no redundant title', () => { | ||
| const date = moment('2020-01-15T12:00:00') | ||
| const wrapper = mountGroup(date.toISOString()) | ||
| const heading = wrapper.get('.activity-group__heading') | ||
|
|
||
| expect(heading.text()).toBe(date.format('LL')) | ||
| expect(heading.attributes('title')).toBeUndefined() | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.