Skip to content

Conversation

joaquincasal
Copy link
Collaborator

Purpose

Add UI for the app sidebar.

Approach

This only includes how the sidebar looks, the behaviour of showing the correct link will be handled in a separate PR.

Testing steps

Automatic tests were added.

Screenshot 2025-10-03 at 16 01 46

We display entries id for now, when we have to fetch the actual entries we'll use entry titles.

@joaquincasal joaquincasal requested a review from a team as a code owner October 3, 2025 19:22
@joaquincasal joaquincasal changed the title Add Sidebar UI [MAPS-58] Closest Preview: Add Sidebar UI [MAPS-58] Oct 3, 2025
Comment on lines +12 to 22
it('Renders entry list with titles and relative dates', async () => {
const { getAllByText } = render(<Sidebar />);

expect(getByText('Hello Sidebar Component (AppId: test-app)')).toBeInTheDocument();
await waitFor(() => {
const entryTitles = getAllByText('Entry id', { exact: false });
expect(entryTitles).toHaveLength(5);
});

const updatedTexts = getAllByText(/Updated/);
expect(updatedTexts).toHaveLength(5);
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick: Perhaps I'll change the title of this test to 'Renders entry list with ids and relative dates', and when we change the logic to use the titles come back here and change it.
Because currently we are rendering a entry list with ids.

Same with the
const entryTitles = getAllByText('Entry id', { exact: false });
to
const entryIds = getAllByText('Entry id', { exact: false });

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.

2 participants