Skip to content

Conversation

@Dobrunia
Copy link
Member

@Dobrunia Dobrunia commented Nov 8, 2025

Summary

This pull request introduces a new “My Notes” section in the homepage navigation, allowing authenticated users to view notes they have created directly from the home page.

Details

  • Added new navigation structure with “Recents” and “My Notes” sections in Home.vue.
  • Implemented vertical menu navigation using VerticalMenu component.
  • Created new MyNoteList.vue component to display user-created notes with pagination and load-more functionality.
  • Introduced useMyNoteList.ts composable for fetching and managing personal notes:
  • Loads paginated notes from the /notes/my endpoint.

Purpose

Enhances the homepage UX by providing quick access to the user’s own notes, improving navigation and note management workflow.

Preview

Снимок экрана 2025-11-09 в 01 38 21

Copy link
Member

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

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

some big parts of code are duplicated. For example getMyNoteList duplicates getNoteList.

Get rid of code repetition. And reuse existing code

Comment on lines 3 to 15
<div v-if="user === null">
<Container data-dimensions="large">
<Row :title="t('home.authText')">
<template #right>
<Button
@click="showGoogleAuthPopup"
>
{{ t('auth.login') }}
</Button>
</template>
</Row>
</Container>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

all page content should be wrapped with <PageBlock>


<!-- Authorized users -->
<PageBlock
v-else-if="user !== undefined"
Copy link
Member

Choose a reason for hiding this comment

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

move to computed variable with clear name

Comment on lines 56 to 75
<template v-if="activeMenuItem === 'recents'">
<Heading
:level="1"
:class="$style['page-header']"
>
{{ t('home.sections.recents.title') }}
</Heading>
<NoteList />
</template>

<!-- My notes content -->
<template v-else-if="activeMenuItem === 'myNotes'">
<Heading
:level="1"
:class="$style['page-header']"
>
{{ t('home.sections.myNotes.title') }}
</Heading>
<NoteList :only-created-by-user="true" />
</template>
Copy link
Member

Choose a reason for hiding this comment

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

get rid of code duplication

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.

3 participants