-
Notifications
You must be signed in to change notification settings - Fork 6
feat(new homepage navigation): add section "my notes" to homepage navigation #327
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
base: main
Are you sure you want to change the base?
Conversation
neSpecc
left a comment
There was a problem hiding this 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
src/presentation/pages/Home.vue
Outdated
| <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> |
There was a problem hiding this comment.
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>
src/presentation/pages/Home.vue
Outdated
|
|
||
| <!-- Authorized users --> | ||
| <PageBlock | ||
| v-else-if="user !== undefined" |
There was a problem hiding this comment.
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
src/presentation/pages/Home.vue
Outdated
| <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> |
There was a problem hiding this comment.
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
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
Purpose
Enhances the homepage UX by providing quick access to the user’s own notes, improving navigation and note management workflow.
Preview