UNPKG

@mikezimm/fps-library-v2

Version:

Library of reusable typescript/javascript functions, interfaces and constants

50 lines 3.4 kB
import * as React from 'react'; // import ReactJson from '@microlink/react-json-view'; import { PivotItem, } from '@fluentui/react/lib/Pivot'; // export function putObjectIntoJSON ( obj: any, name: string = null ): JSX.Element { // // return <ReactJson src={ obj } name={ 'panelItem' } collapsed={ true } displayDataTypes={ true } displayObjectSize={ true } enableClipboard={ true } style={{ padding: '20px 0px' }}/>; // return <ReactJson src={ obj } name={ name } collapsed={ false } displayDataTypes={ false } displayObjectSize={ false } enableClipboard={ true } style={{ padding: '20px 0px' }} theme= { 'rjv-default' } indentWidth={ 2}/>; // } /** * FPS Slick Sections Notes: * * ForceWhite does NOT work on collapsible sections.... might at first but if you collapse then expand, no go because web part does not re-apply the classes to the web parts. * @returns */ export function getWebPartHelpElementCSSPerformance() { const WebPartHelpElement = React.createElement(PivotItem, { headerText: 'CSS', itemIcon: 'SpeedHigh' }, React.createElement("div", { className: 'fps-pph-content' }, React.createElement("div", { className: 'fps-pph-topic' }, "CSS Lag and performance"), React.createElement("div", null, "If the web part is not in the ", React.createElement("b", null, "active"), " part of the page, styles will not get updated until the user moves/scrolls to where the web part can be loaded."), React.createElement("div", null, "Any changes to styles happen ", React.createElement("b", null, "AFTER"), " the page loads ", React.createElement("b", null, "so you may notice it change"), "."), React.createElement("div", null, "See Improving Performance below for tips on how to improve perforamnce."), React.createElement("div", { className: 'fps-pph-topic' }, "Tips to improve performance"), React.createElement("h4", null, "Web part location"), React.createElement("div", null, React.createElement("b", null, "Install"), " FPS Slick Sections web part ", React.createElement("b", null, "in the first section on the page"), "."), React.createElement("h4", null, "Minimize what SharePoint has to do before web part is loaded"), React.createElement("ul", null, React.createElement("li", null, "Remove as much navigation as possible."), React.createElement("ul", null, React.createElement("li", null, "Disable Navigation in ", React.createElement("b", null, "Change the Look : Navigation"), " menu"), React.createElement("li", null, "Remove un-neccessary links in navigation"), React.createElement("li", null, "If you are trying to totally hide SharePoint interface, disconnect from HubSite")), React.createElement("li", null, "Reduce the number of sections on your page"), React.createElement("li", null, "Reduce the number of web parts on your page")))); return WebPartHelpElement; } //# sourceMappingURL=CSSPerformance.js.map