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

Fix for issue #398 #399

Merged
merged 3 commits into from
Nov 14, 2019
Merged

Fix for issue #398 #399

merged 3 commits into from
Nov 14, 2019

Conversation

dmitryrogozhny
Copy link
Contributor

Q A
Bug fix? [x]
New feature? [ ]
New sample? [ ]
Related issues? fixes #398

What's in this Pull Request?

Issue: the Placeholder control is using global class names from Office UI Fabric. When no fabric.css file is available (I believe, this is the current default behavior in SharePoint Online), these classes do not work. Icon and text sizes will be smaller than expected in this case.

This PR changes global CSS class names with corresponding mixins, thus the Placeholder control does not depend on Office UI Fabric in runtime.

@msftclas
Copy link

msftclas commented Oct 26, 2019

CLA assistant check
All CLA requirements met.

@codecov-io
Copy link

codecov-io commented Oct 26, 2019

Codecov Report

Merging #399 into dev will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #399   +/-   ##
=======================================
  Coverage   73.31%   73.31%           
=======================================
  Files          18       18           
  Lines         802      802           
  Branches      164      164           
=======================================
  Hits          588      588           
  Misses        164      164           
  Partials       50       50
Impacted Files Coverage Δ
src/controls/placeholder/PlaceholderComponent.tsx 96.66% <50%> (ø) ⬆️

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 ed9cb6c...d75a98c. Read the comment docs.

@dmitryrogozhny
Copy link
Contributor Author

Modified failing tests for the Placeholder:

  • changed selector for the Icon component as the i tag won't have ms-Icon--Add class (data-icon-name attribute is set instead).
  • renamed duplicate test 'Test placeholder without button' to 'Test that placeholder renders' as the test only checks that component renders.
  • disabled a warning message for the Icon component - WARN: 'The icon "Add" was used but not registered. See http://aka.ms/fabric-icon-usage for more information.'
  • changed test condition for 'Test placeholder with custom classname' - it should have a top-level
    container with both standard and custom classes applied.

@dmitryrogozhny dmitryrogozhny reopened this Nov 9, 2019
@AJIXuMuK AJIXuMuK merged commit 876ea4e into pnp:dev Nov 14, 2019
@AJIXuMuK
Copy link
Collaborator

Thank you @dmitryrogozhny for the fix!

@AJIXuMuK AJIXuMuK added this to the 1.16.0 milestone Nov 14, 2019
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.

5 participants