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

PatternFly React: Our own FormFieldset and FormLegend components #1339

Merged
merged 3 commits into from
Oct 18, 2019

Conversation

didierofrivia
Copy link
Member

What this PR does / why we need it:

the patternfly-react lib hasn't implemented still the components for fieldset and legend, so these ones are the ones we will be using until they release their own.

Needed for #1315
Which issue(s) this PR fixes

Verification steps

Special notes for your reviewer:
These components will be removed when patternfly team release the official ones.

@didierofrivia didierofrivia self-assigned this Oct 17, 2019
@didierofrivia didierofrivia force-pushed the pf-react/form-fieldset-legend branch 2 times, most recently from ac197ae to 66e75ba Compare October 17, 2019 07:45
@codecov
Copy link

codecov bot commented Oct 17, 2019

Codecov Report

Merging #1339 into master will decrease coverage by 2.4%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1339      +/-   ##
==========================================
- Coverage   93.17%   90.76%   -2.41%     
==========================================
  Files        2518     2216     -302     
  Lines       83583    68940   -14643     
==========================================
- Hits        77877    62574   -15303     
- Misses       5706     6366     +660
Impacted Files Coverage Δ
.../initializers/backport_pg_10_support_to_rails_4.rb 30% <0%> (-50%) ⬇️
config/initializers/postgres.rb 50% <0%> (-50%) ⬇️
..._portal/admin/account/braintree_blue_controller.rb 51.61% <0%> (-41.94%) ⬇️
...developer_portal/admin/account/ogone_controller.rb 62.5% <0%> (-37.5%) ⬇️
...ib/developer_portal/lib/liquid/drops/pagination.rb 54.76% <0%> (-36.91%) ⬇️
...ortal/admin/account/personal_details_controller.rb 57.14% <0%> (-25.72%) ⬇️
...veloper_portal/admin/messages/outbox_controller.rb 50% <0%> (-25%) ⬇️
lib/developer_portal/lib/liquid/drops/menu.rb 76.92% <0%> (-23.08%) ⬇️
config/initializers/access_token_authentication.rb 55.55% <0%> (-22.23%) ⬇️
lib/developer_portal/lib/liquid/drops/i18n.rb 82.6% <0%> (-17.4%) ⬇️
... and 310 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22b1411...e910308. Read the comment docs.

@didierofrivia didierofrivia changed the title [wip] PatternFly React: Own FormFieldset and FormLegend components PatternFly React: Own FormFieldset and FormLegend components Oct 17, 2019
@didierofrivia didierofrivia changed the title PatternFly React: Own FormFieldset and FormLegend components PatternFly React: Our own FormFieldset and FormLegend components Oct 17, 2019
Copy link
Contributor

@damianpm damianpm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, just leave some comments but totally optional, would like to see it in action

className={css(styles.formFieldset, isInline ? getModifier(styles, 'inline', className) : className)}
>
{label && (
<label className={css(styles.formLabel)} htmlFor={fieldId}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a PF Label component, we could use that to not rewrite already existing components.
But I think it will be lighter and simpler using only a vanilla <label> tag here, considering this is a temporary solution until core PF team develops the <Fieldset /> component. So it's OK for me

Copy link
Member Author

@didierofrivia didierofrivia Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny thing is they use the exactly samelabel composition for their FormGroup component and not the Label component.

@@ -0,0 +1,68 @@
// @flow
// TODO: Replace this component when patternfly-react implements it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if is there an open issue or PR created for this? May be useful to have it, to track progress

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, not a single thing. Also, I didn't open one because they don't have it in their library pattern for v4 nor v3 (following they contribution guidelines). I've asked about this in their slack, but no answer.

@didierofrivia didierofrivia merged commit 8bb2d8f into master Oct 18, 2019
@didierofrivia didierofrivia deleted the pf-react/form-fieldset-legend branch October 18, 2019 05:01
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

Successfully merging this pull request may close these issues.

2 participants