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

Read only text input #3018

Closed
emyarod opened this issue Jun 11, 2019 · 16 comments
Closed

Read only text input #3018

emyarod opened this issue Jun 11, 2019 · 16 comments
Labels
proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: inactive Will close if there's no further activity within a given time type: enhancement 💡

Comments

@emyarod
Copy link
Member

emyarod commented Jun 11, 2019

ref: #2177 by @shixiedesign

A read only variant of Text input is suggested here: carbon-design-system/carbon-contribution#13 (comment)

The “Disabled” option is not viable, as the label and entered data is not accessible. Proposal is to simply remove the line at the base of the "Filled" version of the component, so that it closely matches with the Disabled component, but passes accessibility.

Overview of component (updated May 13)

  • Read-only variant will be keeping underline and dropping the background of the field. We need the underline for low-vision users to recognize this as a text field. Also loosing the underline makes the element a button-style, which would be confusing.
  • Not moving the text position after all. Keeping text 16px away from left of border helps with preserving the form structure.
  • Regular text cursor and allows text selecting
  • Add not-editable icon, icon in PR Add edit--off icon svg & update metadata.yml #2710
  • Optional tooltip when hovering not-editable icon, to provide reason for the field being read-only
  • Overflow text in the field will show in tooltip on hover
  • Should be considered a state, possible readonly attribute
  • Follow the standard readonly attribute: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-readonly

Design spec (updated May 13)

image

In context explorations:

image
image

Finalized design spec. Ready for dev 🤖 updated May 23

Read-only 1

Light variant spec

Only difference from default is changing field background to $field-01 so it is the same as background color.

Read-only 2

@kaylarakower
Copy link

kaylarakower commented Jun 19, 2019

@shixiedesign @emyarod Another proposal to consider (I created this issue prior to seeing @shixiedesign 's, so just some food for thought). The design was created for a slightly use case as none of the fields would be editable.

carbon-design-system/carbon-contribution#17

@stale
Copy link

stale bot commented Aug 10, 2019

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@stale stale bot added the status: inactive Will close if there's no further activity within a given time label Aug 10, 2019
@shixiedesign
Copy link
Contributor

not stale

@stale stale bot removed the status: inactive Will close if there's no further activity within a given time label Aug 11, 2019
@stale
Copy link

stale bot commented Sep 10, 2019

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@stale stale bot added the status: inactive Will close if there's no further activity within a given time label Sep 10, 2019
@stale
Copy link

stale bot commented Sep 13, 2019

As there's been no activity since this issue was marked as stale, we are auto-closing it.

@stale stale bot closed this as completed Sep 13, 2019
@kaylarakower
Copy link

kaylarakower commented Sep 13, 2019

Not stale @shixiedesign

@asudoh
Copy link
Contributor

asudoh commented Oct 21, 2019

Reopening this to restart some discussion - @aagonzales You had a question why tooltip is needed for read-only text input. I think @shixiedesign put this for overflow text, presumably it's difficult (or impossible) for user to go to non-editable text (input) box and move the cursor to see the whole content.

That said, if we have an alternate design to go without tooltip for read-only text input, I think it'll be a good idea. What do you think?

@asudoh asudoh reopened this Oct 21, 2019
@stale stale bot removed the status: inactive Will close if there's no further activity within a given time label Oct 21, 2019
@aagonzales
Copy link
Member

aagonzales commented Oct 24, 2019

@asudoh where's the other issue this was mentioned in? (I couldn't find it again)

@asudoh
Copy link
Contributor

asudoh commented Oct 24, 2019

@aagonzales Sorry I may not have been clear enough - It's #4015. The latest spec for read-only text input requests for a tooltip (presumably for overflow text). Definition tooltip is the closest, but definition tooltip (technically) cannot be activated by focus on <input>. #4015 is for supporting such use case in definition tooltip.

@stale
Copy link

stale bot commented Nov 23, 2019

We've marked this issue as stale because there hasn't been any activity for a couple of weeks. If there's no further activity on this issue in the next three days then we'll close it. You can keep the conversation going with just a short comment. Thanks for your contributions.

@stale stale bot added the status: inactive Will close if there's no further activity within a given time label Nov 23, 2019
@stale
Copy link

stale bot commented Nov 26, 2019

As there's been no activity since this issue was marked as stale, we are auto-closing it.

@stale stale bot closed this as completed Nov 26, 2019
@dianasanborn
Copy link

Hi! Just wanted to follow up and see if there are any updates or changes to the design spec for this, regarding the last few comments about the tooltip.

I know a handful of teams on our end need this, so I want to make sure I'm pointing them to the right place for design guidance unless there have been any changes.

Is there an update on the implementation of this as well, or should our own teams start building this out?

@emyarod
Copy link
Member Author

emyarod commented Oct 7, 2020

the design should be set already, but currently the implementation has been put on hold until further notice. when this is reprioritized I can update my previous PRs like #3054

@bertrandmartel
Copy link

Is there a readonly option for textinput at this time ? I think It's quite important for such a library

@godivareisen
Copy link

@emyarod @shixiedesign Does anybody have updates on the status of this effort? The DataStage team on Cloud Pak for Data has a requirement for showing read-only fields in our connector properties panel.

read-only fields in connector properties

We consume the Elyra common canvas, so this would ideally be something that other teams using the canvas can leverage as well.

@joshblack joshblack removed this from the v10.4 milestone Jun 1, 2021
@jnm2377 jnm2377 added the proposal: open This request has gone through triaging. We're determining whether we take this on or not. label Feb 2, 2022
@abbeyhrt
Copy link
Contributor

Included in #2177, closing in favor of the other issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal: open This request has gone through triaging. We're determining whether we take this on or not. status: inactive Will close if there's no further activity within a given time type: enhancement 💡
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.