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

Adds note tags support #5344

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Commits on Nov 26, 2024

  1. Added NoteTag model and note_tags table

    Added NoteTag model class, note_tags DB table, associations between Note
    and NoteTag and private / foreign keys.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    09bda4e View commit details
    Browse the repository at this point in the history
  2. Added displaying tags on Notes sidebar

    Added Note#tags routine for preparing note tags for rendering using
    "browse/tag_details" partial. Also, added displaying of previously
    prepared note tags between note's "Description" and comments in app/views/notes/show.html.erb.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    e15dfc4 View commit details
    Browse the repository at this point in the history
  3. Updated (j)builder files with note tags

    Added writing note tags in (j)builder files for generating XML, JSON, GPX, RSS and feed files.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    a98e64e View commit details
    Browse the repository at this point in the history
  4. Added support for tags in note creation API

    Improved API::NotesController#create to support tags (if passed). Also, added adding of "created_by:OpenStreetMap-Website" tag to note when created from OSM website.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    67d150d View commit details
    Browse the repository at this point in the history
  5. Added note_tag factory and NoteTag model test-case

    Added registering new factory bot for note_tag and added new unit tests
    to NoteTagTest for checking if key length is valid, value length is
    valid, key length is invalid, value length is invalid, orphaned tag is
    invalid and note_tags are unique.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    feb68f7 View commit details
    Browse the repository at this point in the history
  6. Added unit test for notes with tags

    Added NotesControllerTest#test_displaying_note_with_tags unit test for testing cases when note has tags and comment (description). Internally, new note is created with comment (description) and several tags and then rendered in sidebar. Existence of appropriate HTML tags for notes, comment (description) and tags is checked.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    0efc5ed View commit details
    Browse the repository at this point in the history
  7. Test note/tag output created at ActiveRecord level

    Added testing of note XML, JSON, GPX, RSS and feed outputs (with tags)
    when note (and tags) are created on FactoryBot / ActiveRecord level.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    16f0d6c View commit details
    Browse the repository at this point in the history
  8. Test note/tag output created at POST/HTML level

    Added testing of note XML, JSON, GPX, RSS and feed outputs (with tags)
    when note (and tags) are created by sending POST/HTTP request.
    nenad-vujicic committed Nov 26, 2024
    Configuration menu
    Copy the full SHA
    22c4ef9 View commit details
    Browse the repository at this point in the history