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

Add support for form schema property setting textarea rows value #3759

Merged
merged 3 commits into from
May 20, 2024

Conversation

d10sfan
Copy link
Contributor

@d10sfan d10sfan commented May 17, 2024

This adds an ability to set the initial rows setting for the textarea, instead of it being hard-coded to 1. This allows you to then pass into the form widget the following schema:

{
	"properties": {
		"first_name": {
			"type": "string",
			"description": "your name",
			"default": "default",
                        "rows": 10
		}
	},
	"required": []
}

The main use case here is that if you have a large value on the form, being able to set the rows allows to have it expanded by default, instead of the user only seeing 1 line of a very large string. Let me know if there's any better places to put the config.

Fixes #3758


🚀 This description was created by Ellipsis for commit a8dc506

Summary:

Enhanced textarea in LightweightArgInput.svelte to support dynamic rows setting from schema, improving UX for larger text inputs.

Key points:

  • Updated LightweightArgInput.svelte to dynamically set textarea rows from schema.
  • Uses extra?.['rows'] || 1 to determine rows count, defaulting to 1 if not specified.
  • Enhances UX for larger text inputs by not limiting to a single row.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

github-actions bot commented May 17, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot 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 to me! Reviewed everything up to a8dc506 in 44 seconds

More details
  • Looked at 14 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_pXiRPVhr60GIIkxD


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@d10sfan
Copy link
Contributor Author

d10sfan commented May 17, 2024

I have read the CLA Document and I hereby sign the CLA

@d10sfan
Copy link
Contributor Author

d10sfan commented May 17, 2024

recheck

github-actions bot added a commit that referenced this pull request May 17, 2024
@rubenfiszel rubenfiszel merged commit 158a83b into windmill-labs:main May 20, 2024
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2024
@d10sfan d10sfan deleted the form-input-height branch May 20, 2024 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: Control the height of a form input
2 participants