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

[added] add class to html when modal is open #588

Closed
wants to merge 1 commit into from

Conversation

bannier
Copy link
Contributor

@bannier bannier commented Jan 3, 2018

Changes proposed:

  • add class to html when modal is open

Acceptance Checklist:

  • All commits have been squashed to one.
  • The commit message follows the guidelines in CONTRIBUTING.md.
  • Documentation (README.md) and examples have been updated as needed.
  • If this is a code change, a spec testing the functionality has been added.
  • If the commit message has [changed] or [removed], there is an upgrade path above.

This addition involves renaming some helpers from bodyClass to more generic terms.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 86.19% when pulling a673c78 on bannier:master into 79688e8 on reactjs:master.

@prztrz
Copy link

prztrz commented Jan 3, 2018

This solves my problem from #585 completely

@diasbruno
Copy link
Collaborator

@bannier Thanks!! I'll review your PR later. Looks good.

@diasbruno
Copy link
Collaborator

https://github.com/reactjs/react-modal/blob/master/examples/basic/app.css

This is the example of css for the tests, can you include the class for the html, please?

@bannier
Copy link
Contributor Author

bannier commented Jan 4, 2018

done

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 86.19% when pulling 7cafa47 on bannier:master into 79688e8 on reactjs:master.

@diasbruno
Copy link
Collaborator

I don't know if we should use <html> by default. It seems ok, but maybe we should let the user decide when to enable this.

<Modal htmlOpenClassName={string || null} ... />

If htmlOpenClassName is not defined or null, it should be no-op (in this case, the default value would be null).

Any thoughts?

@diasbruno
Copy link
Collaborator

cc @bannier

Copy link
Collaborator

@diasbruno diasbruno left a comment

Choose a reason for hiding this comment

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

Waiting for feedback.

@bannier
Copy link
Contributor Author

bannier commented Jan 8, 2018

sorry I haven't checked my PR since last week. Sure I can add an option for that. But 2 questions still :

  • don't you think the default should be to add this class ?
  • shouldn't we also add this option for class on <body> too ?

@diasbruno
Copy link
Collaborator

diasbruno commented Jan 8, 2018

I don't know,...It would keep the same behavior for old applications and only enable this for projects that will need this. We will let the same behavior for <body> and let to the user decides for the <html>.

Hope this make sense.

@bannier
Copy link
Contributor Author

bannier commented Jan 8, 2018

It makes sense. I'll do it.

@diasbruno
Copy link
Collaborator

Let me know if you need any help, @bannier?

@rickerd
Copy link

rickerd commented Jan 18, 2018

Uhm.. why not merging this?? I have the same issue..

Copy link
Collaborator

@diasbruno diasbruno left a comment

Choose a reason for hiding this comment

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

The changes are mentioned in the comment section.

@diasbruno
Copy link
Collaborator

@bannier @rickerd I'll merge this PR and make a new PR with the requested changes. It will take a little longer to release a new version with this feature.

@bannier
Copy link
Contributor Author

bannier commented Jan 23, 2018

Sorry @diasbruno I had issues with adapting tests to this option and didn't took a second shot at it since. Work in progress here

@diasbruno
Copy link
Collaborator

No problem, @bannier. Please, let me know if you need anything.

@semone
Copy link

semone commented Feb 12, 2018

Nice job!
What is the status on this PR? This would solve an issue I have

@alex-shamshurin
Copy link

Guys, more than 1 month has gone. Would it be finally merged or not?

@diasbruno
Copy link
Collaborator

I'm moving this PR to a new one (#614).

Thank you so much, @bannier, for this feature.

@diasbruno diasbruno closed this Feb 20, 2018
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.

None yet

7 participants