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

<input size="10"> is not big enough to hold 10 characters #1

Closed
rothskeller opened this issue Apr 24, 2015 · 6 comments
Closed

<input size="10"> is not big enough to hold 10 characters #1

rothskeller opened this issue Apr 24, 2015 · 6 comments

Comments

@rothskeller
Copy link

Try UH4ACP0150 as example input to see this.
Reported from CI Manager USB Key generator, http://crauth.usa.hp.com/cim-usb-key/

@rothskeller
Copy link
Author

A better example is the iLO Advanced license key field, in the iLO access section of the form. It has size="29", but only 25½ characters fit.

@mattfarina
Copy link
Contributor

@rothskeller A couple quick questions...

  1. What is the context for <input size="10">? I don't see that in the grommet codebase.
  2. The link you shared is not publicly accessible. Do you have an example that is publicly accessible?

@rothskeller
Copy link
Author

I reported this while generating a web tool using grommet (not publicly accessible, as you noted). The tool presents a Form, and one of the FormFields accepts a serial number. The serial number is 10 characters, all in uppercase, and I used size="10" in order to make the entry field an appropriate size. However, when 10 uppercase characters were entered in it, only 8½ actually fit. There was a similar problem with a license key field, size="29", only 25½ actually fit.

I regret that I don't have a publicly accessible example of this at the moment, but I imagine you could easily duplicate it on any form with an input that sets a size= value. Just enter that many uppercase letters into it and you'll see they don't all fit.

@bryanjacquot
Copy link
Contributor

@ericsoderberghp I just looked at the form fields in the documentation and the form fields don't have a size parameter. I set a size value on the input field by editing the HTML in the browser, and it seemed to be ignored. I'm wondering if the new Form layouts render this no longer an issue as the forms seem to respond to the display appropriately.

@ericsoderberghp
Copy link
Member

@bryanjacquot you are correct. The FormField controls the size of the input. Currently, all inputs are the same width.

@rothskeller
Copy link
Author

OK, then in that case this issue is outdated.

ericsoderberghp pushed a commit that referenced this issue Aug 26, 2015
merging hp/grommet to mine
alansouzati pushed a commit that referenced this issue Aug 2, 2016
taysea pushed a commit to taysea/grommet that referenced this issue May 26, 2020
taysea added a commit to taysea/grommet that referenced this issue Dec 8, 2020
* Add show/step to DataTable and List, introduce theming

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Incorporate feedback

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>
ShimiSun added a commit that referenced this issue Feb 18, 2021
* first pass pagination

* first pass refinements

* remove comment

* Iterations to Pagination PR based on initial feedback (#1)

* Add show/step to DataTable and List, introduce theming

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Incorporate feedback

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* state and index to children render

* Allow show to accept object (#2)

* Add show/step to DataTable and List, introduce theming

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Incorporate feedback

* Allow show page and show item

* Normalize show and call index

* Extract logic to reusable function

* Update story to use index

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Propose list of tests to be written (#5)

* Propose list of tests to be written

* Update tests

* Update src/js/components/DataTable/__tests__/DataTable-test.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/components/List/__tests__/List-test.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/components/Pagination/__tests__/Pagination-test.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/components/Pagination/__tests__/Pagination-test.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Add behavior tests

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Starter for pagination docs (#6)

* Pagination docs starter

* Update pagination default

* Remove children, showFirst, showLast, use numItems (#7)

* Add show/step to DataTable and List, introduce theming

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Incorporate feedback

* Allow show page and show item

* Normalize show and call index

* Extract logic to reusable function

* Update story to use index

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/utils/pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Specify show and step in theme

* linting fix

* Remove children, showFirst, showLast, use numItems

* Remove children, showFirst, showLast, use numItems

* Leave story

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* finish cleaning up showFirst showLast

* Use page prop instead of show (#9)

* Use page prop instead of show

* Update src/js/components/List/List.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Add startIndex, endIndex to onChange (#10)

* Add startIndex, endIndex to onChange

* Update src/js/components/Pagination/Pagination.js

Co-authored-by: taysea <taylor.seamans@yahoo.com>

* Update src/js/components/Pagination/stories/Cards.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update src/js/components/Pagination/Pagination.js

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Refinements

Co-authored-by: Matthew Glissmann <mdglissmann@gmail.com>

* Update how numMiddlePages works (#11)

* Update how numMiddlePages works

* Set middlePage floor, adjust warning

* Allow paginate to accept object, update docs and types

* merge master

* First pass at tests

* Update docs

* Update numMiddlePages and adjust stories

* Fix tests, update storybook structure

* Remove ideation comments

* Simplify usePagination and take out of Pagination.js

* Add separator prop, call controls

* Rename to PageControl

* Adjust story structure, simplify props

* Add edge case tests

* cap page at last page

* Remove unrelated test

* Add show to List and DataTable

* wrap datatable and pagination in contaienr

* make PageControl more consistent

* Allow user to theme via theme.button.pagination

* Adjust theming structure to theme.pagination.button (#13)

* Adjust pagination control padding to flex based on borders for button states. (#14)

* adjust pagination control padding to flex based on borders for button states

* incorporate naming feedback

* include updated snapshots

* Incorporate first round of feedback

* Update src/js/themes/base.js

Co-authored-by: Shimi <shimrit.yacobi@gmail.com>

* Update src/js/components/Pagination/stories/Custom.js

Co-authored-by: Shimi <shimrit.yacobi@gmail.com>

* Revert "Merge branch 'master' into feat/pagination-matt"

This reverts commit 9382700, reversing
changes made to 886eab2.

* story import Pagination from grommet (#16)

* useMemo and doc edits

* Update src/js/themes/base.js

Co-authored-by: Shimi <shimrit.yacobi@gmail.com>

* Use number instead num

* Update base.d.ts

* Fix file names

* Remove hpe from storybook example

* Pagination story imports (#17)

* story import Pagination from grommet

* adding size prop and functionality

* adding size prop and functionality

* modify size story

* incorporate cleanup feedback

* No lint changes

* Fix lint on doc

* Add tests for size and custom theme

* Lint cleanups

* Set margin default in theme

* Update theme default placement

* adding pagination themeDocs definitions (#18)

* adding pagination themeDocs definitions

* doc phrasing tweaks

* updating dependecies

* Pagination w button size (#19)

* Adjust DataTable Header/Footer on Body overflow (#4896)

* Adjust DataTable Header/Footer on Body overflow

* Rename variables, add test case

* Adjust DataTable scrollOffset for GroupedBody

* Refactor width prop, remove tests

* Use useLayoutEffect instead of useEffect

Co-authored-by: Eric Soderberg <eric.soderberg@hpe.com>

* Fix border radius when full (#4899)

Co-authored-by: Eric Soderberg <eric.soderberg@hpe.com>

* Changed Distribution to fix an issue with undefined values (#4900)

* Fix button padding to be based on the size (#4886)

* Fix button padding coming from the size in the theme to adjust for border width defined in the kind section of theme

* Addressed review feedback

Co-authored-by: Shimi <shimrit.yacobi@gmail.com>

* Enhance heading theme to accept color (#4903)

* Enhance heading theme to accept color

* Update docs

* add show prop

Co-authored-by: Leonardo Santiago <47114840+leossantiago@users.noreply.github.com>
Co-authored-by: Eric Soderberg <eric.soderberg@hpe.com>
Co-authored-by: taysea <taylor.seamans@yahoo.com>
Co-authored-by: MikeKingdom <michael.kingdom@hpe.com>
Co-authored-by: Shimi <shimrit.yacobi@gmail.com>

* adjusted pad should not go negative

* fix packagejson (#22)

* fix packagejson

* modify kind DOM leak approach

* incorporate story feedback (#23)

* changes from linter

* remove legacy story structure file

* story titles for new story structure

* update control keys and addin storybook title

* update control keys and addin storybook title

* Docs clean ups

* Update Custom story to be .tsx

* Refactor theme to rely on pagination.button (#24)

* Refactor theme to use pagination.button

* Simplify logic and docs

* Update src/js/components/DataTable/DataTable.js

Co-authored-by: Shimi <shimrit.yacobi@gmail.com>

* Update src/js/components/List/doc.js

Co-authored-by: Shimi <shimrit.yacobi@gmail.com>

* Update docs

Co-authored-by: Taylor Seamans <taylor.seamans@yahoo.com>
Co-authored-by: Shimi <shimrit.yacobi@gmail.com>
Co-authored-by: Leonardo Santiago <47114840+leossantiago@users.noreply.github.com>
Co-authored-by: Eric Soderberg <eric.soderberg@hpe.com>
Co-authored-by: MikeKingdom <michael.kingdom@hpe.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants