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

Allow renaming tags #730

Merged
merged 6 commits into from
Jan 2, 2021
Merged

Conversation

guneskaan
Copy link
Contributor

@guneskaan guneskaan commented Dec 20, 2020

Allow renaming tags as requested in #324 (https://github.com/BoostIO/BoostNote.next/projects/3#card-33058499).
Screen Shot 2020-12-21 at 10 13 43 AM

This feature also adds Control button to TagListFragment, meaning that three vertical dots will appear next to the tags in the list menu, showing 'Rename Tag' and 'Remove Tag' options. This way, web browser users will be able to rename tags, because they cannot right click on the tag list item.

Also added analytics event renameTag: 'tags.rename for tracking.

Added automated tests to store.spec.ts and PouchNoteDb.spec.ts to verify renaming functionality.

Manually tested:

  • Renaming tags in local PouchDB storage, reload and sync.
  • Renaming tags in cloud PouchDB storage, reload and sync.
  • Renaming tags in FS storage, reload.

@guneskaan guneskaan mentioned this pull request Dec 20, 2020
@Rokt33r Rokt33r added the awaiting review ❇️ Pull request is awaiting a review. label Dec 27, 2020
async renameTag(currentTagName: string, newTagName: string): Promise<void> {
const currentTag = await this.getTag(currentTagName)
if (currentTag == null)
return
Copy link
Member

Choose a reason for hiding this comment

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

{ return }

<NavigatorButton
iconPath={mdiDotsVertical}
onClick={openTagContextMenu(tagName)}
/>
Copy link
Member

Choose a reason for hiding this comment

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

Please use prettier

@Rokt33r Rokt33r force-pushed the allow-renaming-tags branch from 4f1fcc5 to 9d73bf0 Compare January 2, 2021 23:03
@Rokt33r
Copy link
Member

Rokt33r commented Jan 2, 2021

I've refactor the codemyself. Please check 9d73bf0!

@Rokt33r Rokt33r merged commit 4e75322 into BoostIO:master Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review ❇️ Pull request is awaiting a review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants