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

feat(tw): init listbox component #4421

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

Conversation

davidruvolo51
Copy link
Contributor

@davidruvolo51 davidruvolo51 commented Oct 31, 2024

What are the main changes you did:

how to test:

todo:

  • updated docs in case of new feature
  • added/updated tests
  • added/updated testplan to include a test for this fix, including ref to bug using # notation
  • Add support for Objects, booleans, and numbers as input.

@davidruvolo51
Copy link
Contributor Author

See issue #4446

@davidruvolo51 davidruvolo51 marked this pull request as ready for review November 12, 2024 14:50
@davidruvolo51
Copy link
Contributor Author

Need to add docs

svandenhoek and others added 4 commits November 26, 2024 10:29
#4323)

* Moved namespace creation to own method + enum

* auto-formatting

* simplified code

* minor renames for more clarity

* Split ColumnType mapping knowledge to separate class

* auto-formatting

* Adjusted for equals check

* Fixed empty values check

* Added email fix

* Fix to copy old behavior

* Added some notes

* Created dedicated function for String methods to remove some initially needed castings.

* Minor javadoc changes

* Added a test that validates if all ColumnTypes are covered by a mapper

* reverted an accidental change

* auto-formatting

* Split RDF row generating into separate functions

* added baseURL validation to ColumnTypeRdfMapper

* Fixed UUIDs being represented as Strings

* concept version of testing all ColumnType conversions

* Enabled previously failing test code

* fixed a test

* fixed a bug for datetime_array

* Updated tests

* Fixed ColumnType.FILE IRI

* ColumnType.HEAD correct implementation/test

* Fixed test to check correctly for REFBACK (non-query retrieval excludes REFBACK values)

* Updated test comments

* JSONB_ARRAY now not included in RDF output

* fixed comment

* Added some basic file metadata for ColumnType.FILE

* Added missing drop schema in test

* Added test to validate if refback is in RDF output

* Fixed a bug regarding composite keys

* Added missing drop schema in testing

* auto-formatting

* auto-formatting

* Revert "auto-formatting" -> in class unrelated to this PR

This reverts commit 4f5d0ce.

* fixes AUTO_ID (uses Snowflake ID, not UUID)
* Fix CSV formatting

* Add combined_network attribute

* Typos

* Clarify description

* Add combined_network to demo data
@davidruvolo51
Copy link
Contributor Author

davidruvolo51 commented Nov 26, 2024

Blocking on #4493

No longer relevant

@davidruvolo51
Copy link
Contributor Author

davidruvolo51 commented Nov 26, 2024

do you suggest merge and then link to form

I would propose that we merge and work on the form integration separately. It is unclear to me how the data flows into the component from parent components and it would be best to keep this PR focused.

can we also do multi-select, grouping , filtering , lazy loading , or are these things out of scope for this pr ?

This is listed in the issue #4446

Copy link
Contributor

@chinook25 chinook25 left a comment

Choose a reason for hiding this comment

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

Looks good and works :)
Got some minor comments and the request for supporting other data types.

apps/tailwind-components/types/listbox.ts Outdated Show resolved Hide resolved
apps/tailwind-components/types/listbox.ts Outdated Show resolved Hide resolved
e2e/tests/tailwind-components/input/listbox.spec.ts Outdated Show resolved Hide resolved
apps/tailwind-components/pages/input/Listbox.story.vue Outdated Show resolved Hide resolved
apps/tailwind-components/components/input/Listbox.vue Outdated Show resolved Hide resolved
apps/tailwind-components/components/input/Listbox.vue Outdated Show resolved Hide resolved
apps/tailwind-components/components/input/Listbox.vue Outdated Show resolved Hide resolved
@davidruvolo51 davidruvolo51 requested review from chinook25 and removed request for chinook25 and connoratrug December 9, 2024 10:37
Copy link
Contributor

@connoratrug connoratrug left a comment

Choose a reason for hiding this comment

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

really nice to be able to test it in the form context

few things i noticed while testing in the form:

  • it does not show the required field message
  • it does not close the dropdown when i select a other field
  • in de default theme the selected item background color is the same a the page background color, as a result popdown feels a bit broken / strange ?
  • the dropdown does not close when i click outside the form
  • the select value does not right align with the oder field values

as notes in de code comments, i suggest to move the data fetch outside of the form component and preferably triggered from the component that requires the data ( lazy), else we and up with large if else blocks the do al kind of data fetches for different component types.

Copy link
Member

@mswertz mswertz left a comment

Choose a reason for hiding this comment

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

nice. I would like to integrate this into #4585 so I can also provide option to have checkbox/radio or select.


const refData = ref();

onMounted(async () => {
Copy link
Member

Choose a reason for hiding this comment

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

why is this here? Innovative thought to do it here. For ref I moved this to the component so I can also define search behaviors. But we could move search behaviors to here assuming they are consistent across all lookup types (checkbox, radio, list, selectabletable, tree, etc)

@focus="$emit('focus')"
@update:modelValue="$emit('update:modelValue', $event)"
@error="$emit('error', $event)"
></LazyInputTextArea>
<LazyInputListbox
Copy link
Member

Choose a reason for hiding this comment

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

I think there will be multiple ways to display a ref so for now I would be okay to merge like this but there are already other PRs in the making for the other representation. As written above.

My proposal is to make explicit in emx metadata if you like to display a checkbox/radio/select/tree or table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants