Skip to content

Inform users of word duplication in document form#539

Merged
MizukiTemma merged 1 commit intodevelopfrom
show_existing_words
Jun 20, 2024
Merged

Inform users of word duplication in document form#539
MizukiTemma merged 1 commit intodevelopfrom
show_existing_words

Conversation

@MizukiTemma
Copy link
Copy Markdown
Member

@MizukiTemma MizukiTemma commented Jun 13, 2024

Short description

This PR adds a functionality that informs user of possible duplication when they are editing/creating a word.

Proposed changes

  • Introduce a new function get_documents_by_string find_duplicates_for_word, which looks for documents objects with the same "word" attribute.
  • Call it whenever something is changed in the word field on the document form
  • Show users whether the current input has a duplicate in the system or not.

Resolved issues

Fixes: #470

@MizukiTemma MizukiTemma requested a review from a team June 13, 2024 21:13
@MizukiTemma MizukiTemma force-pushed the show_existing_words branch from 408d879 to d2b88c4 Compare June 13, 2024 21:15
Copy link
Copy Markdown
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Thank you so much for your PR! Please find my suggestions and ideas below :)

Comment thread lunes_cms/api/utils.py Outdated
Comment thread lunes_cms/api/utils.py Outdated
Comment thread lunes_cms/cms/fixtures/test_data.json
Comment thread lunes_cms/locale/de/LC_MESSAGES/django.po Outdated
Comment thread lunes_cms/locale/de/LC_MESSAGES/django.po Outdated
Comment thread lunes_cms/static/js/toggle_plural_field.js Outdated
@MizukiTemma MizukiTemma force-pushed the show_existing_words branch 2 times, most recently from 04b5f4f to 362b755 Compare June 19, 2024 14:40
Co-authored-by: JoeyStk <72705147+JoeyStk@users.noreply.github.com>
@MizukiTemma MizukiTemma force-pushed the show_existing_words branch from 362b755 to f18e2f1 Compare June 19, 2024 14:43
@MizukiTemma MizukiTemma requested a review from JoeyStk June 19, 2024 14:49
@MizukiTemma
Copy link
Copy Markdown
Member Author

@JoeyStk Thank you for suggestions. They are all addressed now 😸

Copy link
Copy Markdown
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Thank you so much for the changes! 🚀

@MizukiTemma MizukiTemma merged commit 57ca817 into develop Jun 20, 2024
@MizukiTemma MizukiTemma deleted the show_existing_words branch June 20, 2024 08:59
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.

recognition of already stored vocabulary

2 participants