quasar icon indicating copy to clipboard operation
quasar copied to clipboard

Update Outlined Inputs & Controls to match latest Material Design Components specification

Open alexdee2007 opened this issue 6 years ago • 57 comments

Description

It would be nice to be able to set the input to use the Material outlined text field

Expected feature

Being able to create inputs like the ones on the right (label location)

Material text field types

1. Filled text fields

2. Outlined text fields

Here are examples of implementation in Google Material Components for web

https://material-components.github.io/material-components-web-catalog/#/component/text-field

alexdee2007 avatar Feb 14 '19 07:02 alexdee2007

Hi,

For perf reasons (and many CSS issues that would arise), label won't float like that. Sorry.

rstoenescu avatar Feb 14 '19 08:02 rstoenescu

Never?

This label style is very important for faithful specs of Material Design 2, viwed like in project description.

AGPDev avatar May 28 '19 19:05 AGPDev

I tend to agree, this style should be possible.

nothingismagick avatar May 28 '19 19:05 nothingismagick

Would happily accept a PR that takes perf into consideration (including browser CSS render speed) :)

rstoenescu avatar May 28 '19 19:05 rstoenescu

In Vuetify 2 this works, unfortunately i won't have skills in CSS to make this, but i would love make

https://imgur.com/x2DD104.png

AGPDev avatar May 28 '19 19:05 AGPDev

The label has a white background and is positioned (absolute) on top of the border. This is not hard to accomplish BUT the problem is identifying the correct background color for the label.

Any ideas?

renanBritz avatar Jul 15 '19 17:07 renanBritz

Exactly this is the problem :)

pdanpdan avatar Jul 15 '19 17:07 pdanpdan

In this example they break the input field into three sections:

outline_label

So it doesnt look like they have to deal with background colors.

renanBritz avatar Jul 15 '19 18:07 renanBritz

@pdanpdan Maybe the example above can be applied to quasar?

renanBritz avatar Jul 19 '19 15:07 renanBritz

FYI, Vuetify has this.

https://vuetifyjs.com/en/components/text-fields

Scott

smolinari avatar Sep 28 '19 14:09 smolinari

lol, @smolinari, why are you showing the Russian vuetify site? ;)

hawkeye64 avatar Sep 30 '19 22:09 hawkeye64

@hawkeye64 - Ha. I didn't realize that. URL changed.

Scott

smolinari avatar Oct 01 '19 16:10 smolinari

Any update here? For me this small detail is VERY important.

paladin2005 avatar Oct 22 '19 17:10 paladin2005

+1 I'm also interested in this style, it would be really useful and would become the main style of my application if released. Thank you!

robsoncombr avatar Feb 10 '20 20:02 robsoncombr

Can be silly... but for me is too late. I ended jumping to element-ui for this.

paladin2005 avatar Feb 11 '20 14:02 paladin2005

@paladin2005 Maybe you can get some inspiration from this codepen: https://codepen.io/Hawkeye64/details/GRgpXEP

hawkeye64 avatar Feb 11 '20 19:02 hawkeye64

all the examples for quasar qfield are broken: https://quasar.dev/vue-components/field#Example--Design-Overview

ontwikkelfabriek avatar Jan 10 '21 18:01 ontwikkelfabriek

@ontwikkelfabriek and by that you mean what?

pdanpdan avatar Jan 10 '21 18:01 pdanpdan

every qfield example has "Field content" as input value. And every example does not respond to input( broken). Just look you'll see.

ontwikkelfabriek avatar Jan 10 '21 19:01 ontwikkelfabriek

:) they are static fields

pdanpdan avatar Jan 10 '21 19:01 pdanpdan

@ontwikkelfabriek QField is basically a wrapper that you can use to create custom input components. If you want a fully functional input component use QInput instead.

renanBritz avatar Jan 10 '21 19:01 renanBritz

@ontwikkelfabriek (dobbel) @renanBritz is correct. QField is already automatically wrapped aropund QInput, QSelect and QField. But, you can wrap it around something like QCheckbox using the same model value to get a different look-and-feel.

hawkeye64 avatar Jan 10 '21 21:01 hawkeye64

Any news about this ? There is 2 PR addressing this isssue, https://github.com/quasarframework/quasar/pull/8669 and https://github.com/quasarframework/quasar/pull/7360. Are there any plans to merge any of them ?

J3m5 avatar Apr 27 '21 19:04 J3m5

I also noticed the behaviour of outlined QInput doens't follow Material design guidelines. Hope those two PR are going to be merged in main branch soon :)

laspinacristian avatar Apr 28 '21 13:04 laspinacristian

@laspinacristian - Where do you see this in the guidelines? It's a suggested component with the outlined text field. But I can't find it in the actual design spec guidelines.

Scott

smolinari avatar Apr 28 '21 14:04 smolinari

@laspinacristian - Where do you see this in the guidelines? It's a suggested component with the outlined text field. But I can't find it in the actual design spec guidelines.

Scott

Here

Guidelines is not only the Design, are the components too.

paladin2005 avatar Apr 28 '21 14:04 paladin2005

@smolinari, I think I've used the word 'guidelines' improper.

What I wanted to say is that the same outlined text field in the material.io components collections has label on margins while it's focused.

https://material.io/components/text-fields#specs

laspinacristian avatar Apr 28 '21 15:04 laspinacristian

Ok. Should have scrolled down/ looked closer. There are specs for the outlined field at the bottom.

Scott

smolinari avatar Apr 28 '21 15:04 smolinari

@pdanpdan @smolinari @hmon Can we discuss about the state of this issue ? Can we pick one of the PR ? Can somebody do a review ?

J3m5 avatar May 07 '21 11:05 J3m5

@J3m5 If you use Q1 then you can use in package.json my branch. But there is no guarantee it will end up in the official one, so use with care.

In package.json replace quasar depencency with: "quasar": "https://github.com/pdanpdan/quasar#quasar-pdan-v1.15.13-beta.1"

Then do a yarn or npm install and start the app again.

pdanpdan avatar May 07 '21 12:05 pdanpdan