Skip to content

fix(examples): enhance the SelectorBase example #585

Open

Description

@braughtg

Description

The SelectorBase example can be enhanced in several ways:

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. A row should be added for the invalidFeedbackText prop with an text input that allows the user to specify the text to be used. The default value should be "Selection cannot be empty".
  3. The text in the "PopupUrl" row should be adjusted:
    1. PopupUrl should be popupUrl to match the prop name.
    2. The "DateSelector URL" button should be labeled "DateSelector Url" for consistency.
  4. A row should be added for the label prop with a text input that allows the user to specify the text to be used. The default value should be "Select".
  5. The "Toggle sixth option" button should be labeled "Toggle 6th option" for consistency.
  6. The "Toggle Disabled Items" row should be removed and the "Toggle Disabled Items" button should be moved to the options row and its label should be "Toggle disabled items" for consistency.
  7. The "Select first option" button in the row for the selected prop should be labeled "Select 1st option" for consistency.
  8. The "Select 1st option" button should be disabled if the first option is already selected.
  9. The props should be listed in alphabetical order.

The "Events" in the "Component Event Payloads" table should appear in alphabetical order.

Steps to Reproduce

  1. Go to "FD2 Examples" -> "Components" -> "SelectorBase".
  2. Select the first option "one".
  3. Scroll down to the "Component Props" table.
  4. Observe that there is no "Value" column.
  5. Observe that there is no row or control for the invalidFeedbackText.
  6. Observe that the capitalization in the `PopupUrl" row is not correct.
  7. Observe that there is no row or control for the label prop.
  8. Observe that the "Toggle sixth option" button does not contain the correct text.
  9. Observe that the "Toggle Disabled Items" button is in the incorrect location and its capitalization is inconsistent.
  10. Observe that the capitalization of "Select first option" button is incorrect.
  11. Click the "Select first option" button.
  12. Observe that the "Select first option" button is not disabled.
  13. Observe that the props are not listed in alphabetical order.
  14. Scroll down to the "Component Event Payloads" table.
  15. Observe that the "Events" are not listed in alphabetical order.

Observed Behavior

The "Component Props" table does not contain a "Value" column that displays the current value bound to the prop, it does not contain rows for label or invalidFeedbackText, the capitalization in the PopupUrl is not correct, buttons use "first" and "sixth" instead of "1st" and "6th", there is a row labeled "Toggle Disabled Items" but there is no such prop, and the props to not appear in alphabetical order.

Image

The events in the "Component Event Payloads" table are not in alphabetical order.

image

Expected Behavior

The "ComponentProps" and "Component Event Payloads" table should behave as described 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 SelectorBase example can be found in modules/farm_fd2_examples/src/entrypoints/selector_base/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 SelectorBase component itself, which can be found in components/SelectorBase/SelectorBase.vue. Its documentation can be found in the FarmData2 Components documentation.
  • The example for the PicklistBase component includes a control for the invalidFeedbackText that may serve as a helpful example for both the label and the invalidFeedbackText controls.
  • 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 second 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 second issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions