Skip to content

fix(examples): enable and disable comment controls in CommentBox example #643

Open

Description

@braughtg

Description

The CommentBox example should be enhanced in several ways:

In the "Component Props" table:

  • The "Insert Comment" button should be disabled if the comment input contains text.
  • The "Clear Comment" button should be disabled if the comment input is empty.

Steps to Reproduce

  1. Go to "FD2-Examples" -> "Components" -> "CommentBox"
  2. Scroll down tot he "Component Props" table.
  3. Notice the "Clear Comment" button is enabled.
  4. Type text into the comment input, notice the "Insert Comment" button is still enabled.
  5. Click "Clear Comment" and notice the button is still enabled.
  6. Click "Insert Comment" and notice the button is still enabled.

Observed Behavior

The "Insert Comment" and "Clear Comment" button's do not enable and disable as intended.

Expected Behavior

The "Insert Comment" and "Clear Comment" buttons should behave as described above in the description.

bugInfo.bash Output

git remote -v
-------------
origin	https://github.com/FarmData2/FarmData2.git (fetch)
origin	https://github.com/FarmData2/FarmData2.git (push)
upstream	https://github.com/FarmData2/FarmData2.git (fetch)
upstream	https://github.com/FarmData2/FarmData2.git (push)

git log -1 | head -3
--------------------
commit 11b1bd27e7dc3d287336bdc159caca5ad4bdcb9d
Author: Grant Braught <[email protected]>
Date:   Mon Dec 15 11:34:51 2025 -0500

cat ~/FarmData2/.fd2dev/db.conf
-------------------------------
v3.7.1
db.sample.tar.gz

docker ps (Images and Names)
----------------------------
farmdata2/farmos3:fd2.1 	 fd2_farmos
farmdata2/fd2dev:fd2.13 	 fd2_dev
farmdata2/postgres:fd2.2 	 fd2_postgres

Further Details

  • The code for the CommentBox example can be found in modules/farm_fd2_examples/src/entrypoints/comment_box/App.vue. A PR for this issue should only modify code in this file.
  • You may find it helpful to reference the code for the CommentBox component itself, which can be found in components/CommentBox/CommentBox.vue. Its documentation can be found in the FarmData2 Components documentation.
  • The following command is used to rebuild the example pages:
    npm run build:examples
    
    • Use SHIFT+reload to reload the example page after rebuilding it to see your changes.

Activity

  1. added
    bug
    on Nov 18, 2026
  2. added
    enhancement
    good first issue
    fd2 examples
    and removed
    bug
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfd2 examplesgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions