Skip to content

Commit 32f22f2

Browse files
authored
Merge pull request #295 from SharePoint/dev
Merge for 1.13.1
2 parents 43d85b4 + 69a8337 commit 32f22f2

File tree

10 files changed

+79
-27
lines changed

10 files changed

+79
-27
lines changed

CHANGELOG.JSON

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"versions": [
3+
{
4+
"version": "1.13.1",
5+
"changes": {
6+
"new": [],
7+
"enhancements": [],
8+
"fixes": [
9+
"`WebPartTitle`: Fix for className property which is not defined [#281](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/281)",
10+
"`RichText`: Fix issue where control turns drop-downs black [#279](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/279)"
11+
]
12+
},
13+
"contributions": [
14+
"[Hugo Bernier](https://github.com/hugoabernier)"
15+
]
16+
},
317
{
418
"version": "1.13.0",
519
"changes": {

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Releases
22

3+
## 1.13.1
4+
5+
### Fixes
6+
7+
- `WebPartTitle`: Fix for className property which is not defined [#281](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/281)
8+
- `RichText`: Fix issue where control turns drop-downs black [#279](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/279)
9+
10+
### Contributors
11+
12+
Special thanks to our contributor: [Hugo Bernier](https://github.com/hugoabernier).
13+
314
## 1.13.0
415

516
### New control(s)

docs/documentation/docs/about/release-notes.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Releases
22

3+
## 1.13.1
4+
5+
### Fixes
6+
7+
- `WebPartTitle`: Fix for className property which is not defined [#281](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/281)
8+
- `RichText`: Fix issue where control turns drop-downs black [#279](https://github.com/SharePoint/sp-dev-fx-controls-react/pull/279)
9+
10+
### Contributors
11+
12+
Special thanks to our contributor: [Hugo Bernier](https://github.com/hugoabernier).
13+
314
## 1.13.0
415

516
### New control(s)

docs/documentation/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ nav:
5050
theme:
5151
name: 'material'
5252
palette:
53-
primary: 'blue'
53+
primary: 'teal'
5454
logo: 'assets/pnp-spfx-controls.svg'
5555
feature:
5656
tabs: true

package-lock.json

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@pnp/spfx-controls-react",
33
"description": "Reusable React controls for SharePoint Framework solutions",
4-
"version": "1.13.0",
4+
"version": "1.13.1",
55
"engines": {
66
"node": ">=0.10.0"
77
},

src/common/telemetry/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version: string = "1.13.0";
1+
export const version: string = "1.13.1";

src/controls/richText/RichText.module.scss

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
}
6464

6565
.toolbarDropDownOption {
66+
6667
&.toolbarButtonH2 {
6768
font-size: 21px;
6869
font-weight: 100;
@@ -378,23 +379,25 @@
378379
line-height: 1.3;
379380
}
380381

381-
.ms-Dropdown-item {
382-
background-color: $ms-color-neutralPrimary !important;
383-
color: $ms-color-neutralLighterAlt !important;
384-
-webkit-transition: all 0.3s;
385-
transition: all 0.3s;
386-
-webkit-transition-property: background-color, color;
387-
}
382+
div#DropDownStyles-list, div#DropDownAlign-list, div#DropDownLists-list {
383+
.ms-Dropdown-item {
384+
background-color: $ms-color-neutralPrimary !important;
385+
color: $ms-color-neutralLighterAlt !important;
386+
-webkit-transition: all 0.3s;
387+
transition: all 0.3s;
388+
-webkit-transition-property: background-color, color;
389+
}
388390

389-
.ms-Dropdown-item:hover {
390-
background-color: $ms-color-neutralSecondaryAlt !important;
391-
color: $ms-color-neutralLighterAlt !important;
392-
cursor: pointer;
393-
}
391+
.ms-Dropdown-item:hover {
392+
background-color: $ms-color-neutralSecondaryAlt !important;
393+
color: $ms-color-neutralLighterAlt !important;
394+
cursor: pointer;
395+
}
394396

395-
.ms-Dropdown-item.is-selected,
396-
.ms-Dropdown-item.is-selected:hover {
397-
background-color: $ms-color-themePrimary !important;
398-
color: $ms-color-neutralLighterAlt !important;
397+
.ms-Dropdown-item.is-selected,
398+
.ms-Dropdown-item.is-selected:hover {
399+
background-color: $ms-color-themePrimary !important;
400+
color: $ms-color-neutralLighterAlt !important;
401+
}
399402
}
400403
}

src/controls/richText/RichText.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { Dropdown, IDropdownOption } from 'office-ui-fabric-react/lib/Dropdown';
1616
import { Icon } from 'office-ui-fabric-react/lib/Icon';
1717
import { elementContains } from 'office-ui-fabric-react/lib/Utilities';
1818
import * as telemetry from '../../common/telemetry';
19+
import { initializeIcons } from 'office-ui-fabric-react/lib/Icons';
1920

2021

2122
const TOOLBARPADDING: number = 28;
@@ -27,6 +28,9 @@ const TOOLBARPADDING: number = 28;
2728
* - Block quotes only work on single lines. This is a frequently-requested feature with Quill that isn't available yet.
2829
* - Tables aren't supported yet. I'll gladly add table formatting support if users request it.
2930
*/
31+
32+
initializeIcons();
33+
3034
export class RichText extends React.Component<IRichTextProps, IRichTextState> {
3135
private _quillElem: ReactQuill = undefined;
3236
private _wrapperRef: HTMLDivElement = undefined;
@@ -36,7 +40,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
3640
private ddStyleOpts = [{
3741
key: 0,
3842
text: strings.HeaderNormalText,
39-
data: {}
43+
data: { }
4044
}, {
4145
key: 2,
4246
text: strings.HeaderH2,
@@ -439,11 +443,13 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
439443
Quill.register(SizeClass, true);
440444

441445
return (
442-
<div ref={(ref) => this._wrapperRef = ref} className={`${styles.richtext && this.state.editing ? 'ql-active' : undefined} ${this.props.className}`}>
446+
<div ref={(ref) => this._wrapperRef = ref} className={`${styles.richtext && this.state.editing ? 'ql-active' : ''} ${this.props.className}`}>
443447
<div id={this._toolbarId} style={{top:this.state.wrapperTop}}>
444448
{
445449
showStyles && (
446-
<Dropdown className={`${styles.headerDropDown} ${styles.toolbarDropDown}`}
450+
<Dropdown
451+
id="DropDownStyles"
452+
className={`${styles.headerDropDown} ${styles.toolbarDropDown}`}
447453
onRenderCaretDown={() => <Icon className={styles.toolbarSubmenuCaret} iconName="CaretDownSolid8" />}
448454
selectedKey={this.state.formats.header || 0}
449455
options={this.ddStyleOpts}
@@ -492,6 +498,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
492498
{
493499
showAlign && (
494500
<Dropdown className={`${styles.toolbarDropDown}`}
501+
id="DropDownAlign"
495502
onRenderCaretDown={() => <Icon className={styles.toolbarSubmenuCaret} iconName="CaretDownSolid8" />}
496503
selectedKey={this.state.formats.align || 'left'}
497504
options={this.ddAlignOpts}
@@ -504,6 +511,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
504511
{
505512
showList && (
506513
<Dropdown className={styles.toolbarDropDown}
514+
id="DropDownLists"
507515
onRenderCaretDown={() => <Icon className={styles.toolbarSubmenuCaret} iconName="CaretDownSolid8" />}
508516
selectedKey={this.state.formats.list}
509517
options={this.ddListOpts}

src/controls/webPartTitle/WebPartTitle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class WebPartTitle extends React.Component<IWebPartTitleProps, {}> {
4545
public render(): React.ReactElement<IWebPartTitleProps> {
4646
if (this.props.title || this.props.moreLink || this.props.displayMode === DisplayMode.Edit) {
4747
return (
48-
<div className={`${styles.webPartHeader} ${this.props.className}`}>
48+
<div className={`${styles.webPartHeader} ${this.props.className ? this.props.className : ""}`}>
4949
<div className={styles.webPartTitle}>
5050
{
5151
this.props.displayMode === DisplayMode.Edit && (

0 commit comments

Comments
 (0)