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

Styling issues with input-addons in DDF #7167

Closed
skateman opened this issue Jul 1, 2020 · 9 comments
Closed

Styling issues with input-addons in DDF #7167

skateman opened this issue Jul 1, 2020 · 9 comments
Assignees
Labels

Comments

@skateman
Copy link
Member

skateman commented Jul 1, 2020

I'm trying to reimplement the endpoint detection for openshift/kubernetes in the DDF provider forms and I found this styling issue:

{
  "component": "text-field",
  "name": "endpoints.hawkular.hostname",
  "label": "Hostname (or IPv4 or IPv6 address)",
  "isRequired": true,
  "validate": [
    {
      "type": "required-validator"
    }
  ],
  "inputAddon": {
    "after": {
      "fields": [
        {
          "component": "input-addon-group",
          "name": "detect-hawkular-group",
          "fields": [
            {
              "component": "button",
              "name": "detect-hawkular-button",
              "label": "Detect"
            }
          ]
        }
      ]
    }
  }
}

Screenshot from 2020-07-01 14-12-10

Parent issue: ManageIQ/manageiq#18818

@himdel
Copy link
Contributor

himdel commented Jul 31, 2020

So.. what's the issue? The button shouldn't have the border?

@skateman
Copy link
Member Author

I guess the border is unnecessary + the button is larger than the input.

@himdel
Copy link
Contributor

himdel commented Jul 31, 2020

OK, to get this (in pure bootstrap 3)...

20200731122705

the html needs to be..

<div class="input-group">
  <input class="form-control" style="border-color: red;">
  <div class="input-group-btn">
    <button type="button" class="btn btn-default" style="border-color: red">
      Action
    </button>
  </div>
</div>

(without border-color by default)

Looking..

@skateman
Copy link
Member Author

Yeah, I got almost the same, but the .input-group and .input-group-btn are not div but span and if I replace them with divs, there's no change 😕

@himdel
Copy link
Contributor

himdel commented Jul 31, 2020

20200731130430

Is how the same html looks when I replace our dashboard content with it.
So, looks like patternfly itself is not the culprit..

@himdel
Copy link
Contributor

himdel commented Jul 31, 2020

But seeing the same issue when using the schema, it looks like the generated HTML is..

<span class="input-group">
  <input name="endpoints.hawkular.hostname" id="endpoints.hawkular.hostname" class="form-control" value="">
  <span class="input-group-addon">
    <button name="detect-hawkular-button" type="button" class="btn btn-default">Detect</button>
  </span>
</span>

@himdel
Copy link
Contributor

himdel commented Jul 31, 2020

So, just changing input-group-addon to input-group-btn is probably enough:

20200731131407

@himdel
Copy link
Contributor

himdel commented Jul 31, 2020

-          "component": "input-addon-group",
+          "component": "input-addon-button-group",

works :)

@skateman
Copy link
Member Author

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants