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

[text area]: allow consumers to modify minimum and maximum height and width of the text area #9040

Closed
2 of 6 tasks
Tracked by #7180
LanceStasinski opened this issue Apr 2, 2024 · 3 comments
Closed
2 of 6 tasks
Tracked by #7180
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@LanceStasinski
Copy link

Check existing issues

Description

From a design perspective, there are instances in which it would be useful to restrict the minimum and/or maximum height and width of the native text area element when the text area is resizable. This would mainly be to prevent users from resizing the text area into odd shapes that disturb the flow of the document or obscure the first line of text in the element.

Acceptance Criteria

Developers should have access to a mechanism to set the minimum and maximum height and width of the native text area element without having to breach the shadow DOM to do so. This mechanism could come in the form of web component properties or CSS custom properties.

Relevant Info

No response

Which Component

calcite-text-area

Example Use Case

Here's an example of how we can currently access the shadow DOM to set min/max height/width styles on the native textarea element: https://codepen.io/Lance-Stasinski/pen/dyLJYPw

Priority impact

p4 - not time sensitive

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@LanceStasinski LanceStasinski added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Apr 2, 2024
@github-actions github-actions bot added impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. labels Apr 2, 2024
@macandcheese macandcheese added the design-tokens Issues requiring design tokens. label Apr 2, 2024
@ptmdmusique
Copy link
Contributor

ptmdmusique commented Aug 17, 2024

Any update on the issue ❓ The Home App also needs enhancement as users can currently resize the textarea to infinity and beyond

@geospatialem geospatialem added 2 - in development Issues that are actively being worked on. p - medium Issue is non core or affecting less that 60% of people using the library estimate - 2 Small fix or update, may require updates to tests. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Sep 19, 2024
benelan added a commit that referenced this issue Sep 23, 2024
**Related Issue:** #7180, #7606, #9040

## Summary

Add the following component-scoped CSS Variables to `calcite-text-area`:

`--calcite-text-area-background-color`: Specifies the background color
of the component.
`--calcite-text-area-border-color`: Specifies the border color of the
text area.
`--calcite-text-area-character-limit-text-color`: Specifies the color of
the character limit text displayed in footer of the component.
`--calcite-text-area-divider-color`: Specifies the color of the divider
between the text area and footer.
`--calcite-text-area-font-size`: Specifies the font size of the thext
area and footer.
`--calcite-text-area-max-height`: Specifies the the maximum height of
the text area in the component.
`--calcite-text-area-min-height`: Specifies the minimum height of the
text area in the component.
`--calcite-text-area-text-color`: Specifies the color of text in the
component.
`--calcite-text-area-footer-border-color`: Specifies the border color of
the footer.
@benelan benelan added the 3 - installed Issues that have been merged to master branch and are ready for final confirmation. label Sep 23, 2024
@github-actions github-actions bot removed the 2 - in development Issues that are actively being worked on. label Sep 23, 2024
Copy link
Contributor

Installed and assigned for verification.

@github-actions github-actions bot assigned geospatialem and DitwanP and unassigned benelan Sep 23, 2024
@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Sep 23, 2024
@geospatialem
Copy link
Member

geospatialem commented Sep 23, 2024

Verified with the Chromatic build on 9/23 and the following :

CSS:

#participant-names {
  --calcite-text-area-min-height: 5rem;
  --calcite-text-area-max-height: 10rem;
}

HTML:

<calcite-text-area id="participant-names"></calcite-text-area>

verify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. design-tokens Issues requiring design tokens. enhancement Issues tied to a new feature or request. estimate - 2 Small fix or update, may require updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

6 participants