Skip to content

fix(examples): enhance the WinterKill example #592

Open

Description

@braughtg

Description

The WinterKill example can be enhanced in several ways:

  1. In the "Component Props" table:
    1. A column labeled "Value" should be added to the right side of the table. The cells in this column should display the current value of the Vue data attribute that is bound to the corresponding prop.
    2. The "Prop" names should be renamed to match the names of the props that are accepted by the component.
    3. The "Toggle Checkbox" button should be labeled just "Toggle".
    4. The "Next Date" button should be labeled just "Next".
    5. The "Next" button should be disabled if the checkbox is not checked.
    6. The props should be listed in alphabetical order.
  2. In the "Component Event Payloads" table:
    1. The event labeled "checkboxState" should be labeled update:picked to match the actual name of the emitted event.
    2. The event labeled "date" should be labeled "update:date" to match the actual name of the emitted event.
    3. The value of the payload for the date row should be empty instead of "N/A" if no event has been received.

Steps to Reproduce

  1. Go to "FD2 Examples" -> "Components" -> "WinterKill".
  2. Scroll down to the "Component Props" table.
  3. Observe that the "Prop" names do not match the prop names defined in the component (see the component's .vue file or the docs for the prop names.)
  4. Observe that the button labels for the "Checkbox State" and "Change Date" are not as required.
  5. Scroll down to the "Component Event Payloads" table.
  6. Observe that the "Event" names do not match the actual emitted events.
  7. Observe that the "date` "Payload" is "N/A" when it should be blank.

Observed Behavior

The "Component Props" table does not contain a "Value" column that displays the current value bound to the prop, many of the props and buttons are not labeled correctly, the "Next" button is enabled, and the props do not appear in alphabetical order.

Image

The "Component Event Playloads" table does not use the names of the emitted "Event"s and displays "N/A" instead of blank for the date when the checkbox is unchecked.

Expected Behavior

The "ComponentProps" and "Component Event Payloads" table 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 WinterKill example can be found in modules/farm_fd2_examples/src/entrypoints/winter_kill/App.vue. A PR for this issue should only modify code in this file.
  • The App.vue files in the comment_box, submit_reset_buttons and tray_size_selector directories in modules/farm_fd2_examples/src/entrypoints will provide helpful examples to work from.
  • You may find it helpful to reference the code for the WinterKill component itself, which can be found in components/WinterKill/WinterKill.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
    enhancement
    good first issue
    and removed
    bug
    on Dec 18, 2025
  2. added
    fd2 examples
    on Nov 20, 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