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 49 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

@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.

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.

I would want to make sure that CheckboxGroup, RadioGroup, Lisstbox share types where they can.

And then the make the 'ref' version of those a wrapper around them as you can see in the RefInput PR #4585

@@ -97,3 +97,10 @@ export type columnValue = string | number | boolean | columnValueObject;
interface columnValueObject {
[x: string]: columnValue;
}

export type IInputValue = string | number | boolean;
Copy link
Member

Choose a reason for hiding this comment

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

can we merge this with the other similar data type, I believe it is called ColumnValue?

This is special subset.

@@ -35,30 +35,54 @@ function validate(value: columnValue) {

formFieldInput.value.validate(value);
}

const refData = ref();
Copy link
Member

Choose a reason for hiding this comment

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

I am on the fence if we want to do this here. How will you implement search?
In my opinion it is best to organize the loading (lazily) per input so we can differentiate behaviors.
Which will be different between select, checkbox, and ontology.

const refData = ref();

onMounted(async () => {
if (["ONTOLOGY", "ONTOLOGY_ARRAY"].includes(props.column.columnType)) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't want this here.

@@ -0,0 +1,369 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

So this component will be 'InputListbox'?

I would be happier if we move it to /components/input/Listbox

@mswertz mswertz dismissed their stale review January 23, 2025 08:50

so many chages, need new approval

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