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

new 250 #4

Open
wants to merge 160 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
d2a51d5
Upgrading storybook versions and cleaning the main.js to be faster
mgoldspink-salesforce Sep 22, 2021
cacd2af
changed position of asterisk to right
vartikasf Oct 28, 2021
7470526
Merge pull request #4 from sf-industries/vartika-asterisk
mgoldspink-salesforce Oct 28, 2021
57dc45b
W-9894880 - Adding enable-animated-inputs flag
mgoldspink-salesforce Nov 3, 2021
8b2c361
W-9894880 - config option to render bordered input
mgoldspink-salesforce Nov 8, 2021
5eb52e4
Adding some extra fixes to the stability of the refresh.
mgoldspink-salesforce Nov 8, 2021
0257d64
@W-9802333 : Adding max-height and overflow-y to be consistent with slds
twu-sf Nov 9, 2021
f6725ec
Correcting types in the docs
mgoldspink-salesforce Nov 10, 2021
dfdce8c
Updating to 236
mgoldspink-salesforce Nov 10, 2021
04beb4b
The sass watcher plugin was recreating the gulp watcher on every file…
mgoldspink-salesforce Nov 10, 2021
26142fa
Adding nds prefix to class
twu-sf Nov 10, 2021
b5050d1
W-9894880 - Adding docs page on css zen garden
mgoldspink-salesforce Nov 11, 2021
43f2b20
Merge pull request #7 from sf-industries/twu_236_w9802333
mgoldspink-salesforce Nov 11, 2021
6e20ee6
W-9900484 - fixing up styling of step chart
mgoldspink-salesforce Nov 11, 2021
c4921a7
Merge pull request #8 from sf-industries/feature/zengarden-docs
mgoldspink-salesforce Nov 12, 2021
cb46946
Merge pull request #9 from sf-industries/mgoldspink/W-9900484_v236
mgoldspink-salesforce Nov 12, 2021
7bbed6f
Merge remote-tracking branch 'origin/v236' into feature/enable_underl…
mgoldspink-salesforce Nov 12, 2021
7a08d7e
Merge pull request #6 from sf-industries/feature/enable_underlined_in…
mgoldspink-salesforce Nov 12, 2021
d89767c
@W-9886581, @W-9886551 : Typeahead component stylings
cramamoorthy Nov 16, 2021
84e4a38
W-10046261Shorten the stepchart labels if it's on a mobile device
leonqi77 Nov 17, 2021
935d64d
Merge pull request #16 from sf-industries/lqi/W-10046261-new
mgoldspink-salesforce Nov 17, 2021
520a620
W-9887298 Newport changes for Address Validation resut status
NagaNarasimhaP Nov 18, 2021
4441712
Merge pull request #18 from sf-industries/chandru-v236
mgoldspink-salesforce Nov 18, 2021
cec6ed7
Merge pull request #19 from sf-industries/W-9887298_v2
mgoldspink-salesforce Nov 18, 2021
f861955
W-9891061 style changes for fix now button
rsisodiya Nov 23, 2021
c8c10af
Merge pull request #23 from sf-industries/feature/W-9891061
mgoldspink-salesforce Nov 23, 2021
748f70b
Merge branch 'v236' of github.com:sf-industries/newport-design-system…
shyamravindranair Nov 26, 2021
8c9d3ef
Merge pull request #24 from sf-industries/conflicts/232.6tov236
mgoldspink-salesforce Nov 26, 2021
bb596f2
W-10268321 - Serviceability modal checkbox spacing issue fix
NagaNarasimhaP Dec 14, 2021
e5c1f6d
Merge pull request #29 from sf-industries/W-10268321
mgoldspink-salesforce Dec 14, 2021
fc4cc8a
W-10274615:The typeahead options are hidden inside the table
aditi-saraswat Dec 15, 2021
9c0844b
Merge pull request #30 from sf-industries/v236-AditiS-typeAheadIssue
mgoldspink-salesforce Dec 15, 2021
10e1e40
@W-10274640 : Datatable column and typeahead alignment changes
cramamoorthy Dec 16, 2021
f963b52
Merge pull request #31 from sf-industries/W-10274640
shyamravindranair Dec 16, 2021
ef36954
Moving to sass from node-sass
mgoldspink-salesforce Jan 6, 2022
778dcf8
W-10352948 Added an additional selector
Jan 11, 2022
c870eac
W-10352948 Added an additional selector
Jan 12, 2022
d11472c
Merge pull request #32 from sf-industries/dkim/W-10352948
mgoldspink-salesforce Jan 13, 2022
e06030d
W-10530058: Fix responsive styles for flexipage containers.
bliesch-tmp Feb 8, 2022
d4f445f
Updating stories for flexcards & OS.
mgoldspink-salesforce Feb 9, 2022
09f8a20
Adding missing section from the docs
mgoldspink-salesforce Feb 9, 2022
9e766fc
Update version number and docs
mgoldspink-salesforce Feb 9, 2022
a43db69
Merge pull request #33 from sf-industries/bliesch/238/W-10530058
Feb 9, 2022
1239cda
W-10371905 : Styling changes for groups
cramamoorthy Feb 17, 2022
140a2be
Merge pull request #36 from sf-industries/W-10371905
shyamravindranair Feb 21, 2022
9d0d289
W-10701250 Removed additional selector that is no longer needed
Feb 22, 2022
bc67fd0
Merge pull request #37 from sf-industries/dkim/W-10701250
Feb 23, 2022
51a7ab5
W-10422095 => Added css for linear product relationship component
pjhajee Feb 25, 2022
6ca0591
W-10422095 => Added css for linear product relationship component
pjhajee Feb 25, 2022
8017061
W-10422095 => resolved pr comments
pjhajee Feb 25, 2022
180f038
resolved conflict
pjhajee Feb 25, 2022
9d8c2ec
font-size: 11px
pjhajee Feb 25, 2022
b5e358b
addresss pr comments
pjhajee Feb 28, 2022
acfddc9
Addres pr comments- added color name rather than code
pjhajee Feb 28, 2022
950d991
added max-height in place of height
pjhajee Feb 28, 2022
cfaf4f0
Merge pull request #38 from sf-industries/W-10422095
shyamravindranair Mar 1, 2022
ed7bb9d
@W-10473388 : Styling for linear epic summary
cramamoorthy Mar 25, 2022
4617fd2
Merge pull request #39 from sf-industries/ESM-238
shyamravindranair Apr 6, 2022
960cf90
W-11037258 : Css fix for hover of attributes
cramamoorthy Apr 26, 2022
7568cd4
Merge pull request #40 from sf-industries/ESM-238
shyamravindranair Apr 26, 2022
11330ef
W-11057721 : 2px error borders for Edit Block
twu-sf May 12, 2022
bf19dd6
W-11057721 : Updating version to 240
twu-sf May 12, 2022
75b1af7
Merge pull request #41 from sf-industries/twu_w11057721
mgoldspink-salesforce May 12, 2022
7aba1f8
Updates newport styles to support omniscript read-only inputs being f…
bliesch-tmp May 16, 2022
1b2f0d7
Merge pull request #42 from sf-industries/bliesch/240/W-11121044
mgoldspink-salesforce May 16, 2022
d692942
W-11332031 - fix up package.json and package-lock.json to prevent bro…
mgoldspink-salesforce Jun 22, 2022
ccf97b4
Merge pull request #43 from sf-industries/mgoldspink/240_fix_for_new_…
mgoldspink-salesforce Jun 22, 2022
367ebfe
W-11387639 remove margin on tooltip and add back nds-form-element__label
sf-alexb Jul 6, 2022
b735212
Merge pull request #44 from sf-industries/alex_240
sf-alexb Jul 6, 2022
b9737a1
W-11037199: [238-ESM] The relationship dropdown is hiding behind when…
abh-gupta Aug 4, 2022
e83d7ee
Merge pull request #45 from sf-industries/release-240/W-11037199_drop…
pjhajee Aug 5, 2022
e795fc0
W-11777149 ==> add css for quot clone model
pjhajee Oct 10, 2022
430e2e5
W-11777149=> refactor code
pjhajee Oct 11, 2022
8f552a6
Merge pull request #46 from sf-industries/release-242/W-11777149_quot…
pjhajee Oct 11, 2022
dec79f7
W-11809598 : ESM Mass apply discount, W-11109154 : Remove dropdown ma…
cramamoorthy Oct 20, 2022
3320c2c
ESM : Removed accordion slds classes from newport
cramamoorthy Oct 25, 2022
134a188
Merge pull request #47 from sf-industries/W-11809598_242
aditi-saraswat Oct 27, 2022
e3d95e0
W-11938288: Show loader overlay on complete quote when bulk delete is…
abh-gupta Oct 28, 2022
ed79f10
Merge pull request #48 from sf-industries/release-242/W-11938288_bulk…
aditi-saraswat Nov 3, 2022
883292e
W-11953065 : ESM Mass Discount styling changes
cramamoorthy Nov 14, 2022
4b5c47d
custom css for alignment of pop-over
akodaganur Nov 14, 2022
3d8d58a
Merge pull request #49 from sf-industries/W-11809598_242
aditi-saraswat Nov 15, 2022
9af2de1
review comment fixed
akodaganur Nov 15, 2022
80272e9
Merge pull request #50 from sf-industries/release-242/W-11887205_Cart…
pjhajee Nov 15, 2022
6b2e351
W-11777149: W-11777149 - change quote clone ui
pjhajee Nov 15, 2022
59a7a9a
Merge pull request #51 from sf-industries/release-242/W-11777149_quot…
pjhajee Nov 15, 2022
a843e7c
W-11220130 : ESM bug fix for attributes
cramamoorthy Nov 22, 2022
0c64fbb
Merge pull request #52 from sf-industries/release-242/W-11220130_attr…
aditi-saraswat Nov 22, 2022
3a0b60b
W-12119719 : ESM Mass discount panel styling changes
cramamoorthy Nov 25, 2022
4170410
Review comment changes
cramamoorthy Nov 25, 2022
43f8e6b
Merge pull request #53 from sf-industries/release-242/W-12119719
mgoldspink-salesforce Nov 28, 2022
5b3d150
W-10366042: Footer action buttons partially hides when utility bar is…
abh-gupta Nov 30, 2022
447556b
Merge pull request #54 from sf-industries/release-242/W-10366042_util…
pjhajee Nov 30, 2022
f786b92
242.1 Dynamic/Responsive Column UI in ESM
vinay-z Dec 7, 2022
299a4a0
issue fixed
akodaganur Dec 9, 2022
d7ce812
Merge pull request #56 from sf-industries/release-242/W-12072276-pop-…
dkoonsf Dec 9, 2022
95d9f8a
W-12217640: Loader does not cover whole page when the page size is large
abh-gupta Dec 14, 2022
0b5d5a0
Merge pull request #57 from sf-industries/release-242/W-12217640_loader
abh-gupta Dec 14, 2022
deb7a34
W-12119662 : Styling changes for highlighting promotions
cramamoorthy Dec 14, 2022
d254cd9
Merge pull request #58 from sf-industries/release-242/W-12119662_catalog
pjhajee Dec 14, 2022
2b1d198
W-12194282 : Mass discount styling changes to match UX design
cramamoorthy Dec 15, 2022
cb91548
Review comments changes
cramamoorthy Dec 15, 2022
7a5e166
Merge pull request #59 from sf-industries/release-242/W-12194282
pjhajee Dec 15, 2022
fc02134
W-11956135: Reprice action for ESM Cart.
vinay-z Dec 22, 2022
8d4510f
Review comments addressed.
vinay-z Dec 22, 2022
9a83bba
Merge pull request #60 from sf-industries/release-244/W-11956135_Repr…
dkoonsf Dec 22, 2022
5dcd903
Merge pull request #55 from sf-industries/release-242/W-12127434_Resp…
muruhanantham Dec 23, 2022
891879e
W-12256718: [Accessibility] Enterprise Quote table header hover icons…
abh-gupta Dec 23, 2022
ebcd85a
Merge pull request #61 from sf-industries/release-244/accessibility_bugs
muruhanantham Dec 23, 2022
95952e3
W-12256719: [Accessibility] The “Edit” button actionable elements not…
abh-gupta Dec 26, 2022
c54faf0
W-12256723: [Accessibility] The record checkboxes in the “Summary”, “…
abh-gupta Dec 27, 2022
e2e8906
Merge pull request #62 from sf-industries/release-244/W-12256719_acce…
pjhajee Dec 27, 2022
d702ae0
W-12256771 | W-12256774 | W-12256754 : ESM Accessibility fixes
cramamoorthy Dec 27, 2022
70ca50e
Merge pull request #63 from sf-industries/release-244/W-12256749_acce…
pjhajee Dec 28, 2022
79eb00f
W-12256713: [Accessibility] Minimum color contrast ratio failure: Clo…
abh-gupta Dec 28, 2022
575e288
W-12256715 | W-12256755: Accessibility color fixes
abh-gupta Dec 28, 2022
b2042e2
Merge pull request #64 from sf-industries/release-244/W-12256713_acce…
aditi-saraswat Dec 28, 2022
2eb200d
W-12256765 | W-12256764 | W-12256752 | W-12256751 | W-12256759 : Styl…
cramamoorthy Jan 3, 2023
fee0d49
Merge pull request #65 from sf-industries/release-244/W-12256749_acce…
muruhanantham Jan 3, 2023
ff57110
W-12256753: [Accessibility] Minimum color contrast ratio failure: bor…
abh-gupta Jan 5, 2023
419638c
Merge pull request #66 from sf-industries/release-244/W-12256753_acce…
muruhanantham Jan 5, 2023
e0b4c9b
W-12256739: [Accessibility] Enterprise Sales Management page: illogic…
abh-gupta Jan 6, 2023
ad1c09a
Merge pull request #67 from sf-industries/release-244/W-12256739_show…
pjhajee Jan 6, 2023
1138224
Change css layour for quote version/clone
pjhajee Jan 11, 2023
55501a6
Merge pull request #68 from sf-industries/release-244/W-12266083_quot…
pjhajee Jan 12, 2023
c285fbb
W-12243544 Fix now button style change
rsisodiya Jan 17, 2023
6cc5045
Merge pull request #69 from sf-industries/release-244/W-12243544-FixN…
pjhajee Jan 18, 2023
e0f1899
W-11053343: Styling changes to show action menu above and below
cramamoorthy Feb 3, 2023
8c529e0
Merge pull request #70 from sf-industries/release-244/W-11053343
pjhajee Feb 3, 2023
3eb4fed
Custom styles needed for suborder epic
akodaganur Feb 13, 2023
659b0d1
Merge pull request #71 from sf-industries/release-244/W-12344693-SubO…
dkoonsf Feb 13, 2023
4eb1071
W-12737490: Datatable RowActions known limitation
vinay-z Mar 23, 2023
3a5497d
Merge pull request #75 from sf-industries/release-244/W-12737490_Data…
muruhanantham Mar 23, 2023
dd16838
Revert "W-12737490: [242.1 ESM] order (PONR reached) i can see cancel…
vinay-z Mar 23, 2023
a6a30b2
Merge pull request #76 from sf-industries/revert-75-release-244/W-127…
muruhanantham Mar 23, 2023
5a40fb5
Adding new class
amansoni08 Mar 28, 2023
63905e1
Merge pull request #77 from sf-industries/release-244/W-12620021_Bisc…
muruhanantham Mar 28, 2023
d95473c
Removing scroll bars from config card
j-joshika Apr 12, 2023
367f60d
Merge pull request #78 from sf-industries/release-244/joshika
muruhanantham Apr 12, 2023
50760de
Initial upgrade to Node 18.0.0
mgoldspink-salesforce May 3, 2023
42326d4
fixing up package-lock.json to reduce size of zip
mgoldspink-salesforce May 9, 2023
bb36fb7
W-13175172: Signature - 44553461 - Bell Canada - Catalog hierarchy is…
abh-gupta May 10, 2023
799f684
Merge pull request #80 from sf-industries/release-246/W-13175172_cate…
muruhanantham May 11, 2023
2da8be2
Added colour contrast fix for Radio group, Type ahead and knowledge …
mithunhmohan Jun 28, 2023
1b145b7
changes for step-chart color, success and warning messages and editbl…
mithunhmohan Jun 29, 2023
ea911dc
Fixed review comments
shishir-shukla Jun 30, 2023
df97f5f
reverted valiable delete
shishir-shukla Jun 30, 2023
c405afa
code readjustment for better readability
mithunhmohan Jul 5, 2023
2208249
revert some changes
mithunhmohan Jul 5, 2023
f7de8ea
Merge pull request #84 from sf-industries/CCNewportBranch
sbambal-sf Jul 12, 2023
9f3ccd3
Removing newport-color-accessibility-orange colour
shishir-shukla Jul 12, 2023
11f43cf
Added fix for disabled radio button
shishir-shukla Jul 12, 2023
240fd0b
changed variable names for colour variable name
shishir-shukla Jul 14, 2023
d8002ca
updated color for disabled border
shishir-shukla Jul 14, 2023
4d1c4ad
Merge branch '246' into shishir-A11y-1
shishir-shukla Jul 14, 2023
a470082
Merge pull request #82 from sf-industries/shishir-A11y-1
sbambal-sf Jul 14, 2023
c68c02e
comment message color fix
mithunhmohan Jul 20, 2023
0316772
Merge pull request #86 from sf-industries/editBlockBugFix
sbambal-sf Jul 20, 2023
3a35f01
cc for cancel button border
mithunhmohan Jul 25, 2023
6a448d8
Merge pull request #87 from sf-industries/editblockCC
sbambal-sf Jul 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
!/.stylestatsrc
!/.travis.yml
!/.storybook
!/.npmrc

# Add a .gitkeep file in an empty
# directory to check it in the repository
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
44 changes: 12 additions & 32 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
require("@babel/register");
const path = require("path");
const gulp = require("gulp");
const CaseSensitivePathsPlugin = require("case-sensitive-paths-webpack-plugin");
const NewportSassWatcherPlugin = require("./sass-watcher-plugin");
require("../scripts/gulp/styles");

// const createCompiler = require("@storybook/addon-docs/mdx-compiler-plugin");

module.exports = {
stories: [
"../ui/**/*.stories.@(js|mdx)",
"../docs/**/*.stories.js",
"../ui/*/*.stories.js",
"../ui/*/*/*.stories.js",
"../ui/*/*/*/*.stories.js",
"../ui/*/*/*/*/*.stories.js",
"../docs/*.stories.js",
],
addons: [
"@storybook/addon-knobs",
Expand All @@ -20,36 +22,13 @@ module.exports = {
serverConfig.module.rules.push({
test: /\.(scss|yml)$/,
loaders: ["raw-loader"],
exclude: [/node_modules/],
include: path.resolve(__dirname, "../"),
});

serverConfig.module.rules.push({
// 2a. Load `.stories.mdx` / `.story.mdx` files as CSF and generate
// the docs page from the markdown
test: /\.(stories|story)\.mdx$/,
use: [
{
loader: "babel-loader",
// may or may not need this line depending on your app's setup
options: {
plugins: ["@babel/plugin-transform-react-jsx"],
},
},
// {
// loader: "@mdx-js/loader",
// options: {
// compilers: [createCompiler({})],
// },
// },
],
});

serverConfig.module.rules.push({
test: /\.(stories|story)\.[tj]sx?$/,
loader: require.resolve("@storybook/source-loader"),
exclude: [/node_modules/],
enforce: "pre",
});
serverConfig.plugins = serverConfig.plugins.filter(plugin => {
return !(plugin instanceof CaseSensitivePathsPlugin);
})

serverConfig.plugins.push(new NewportSassWatcherPlugin());
// Sass
Expand All @@ -58,6 +37,7 @@ module.exports = {
serverConfig.node = {
fs: "empty",
};

return serverConfig;
},
}
};
21 changes: 21 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<link rel="stylesheet" href="node_modules/highlight.js/styles/github.css"/>
<link id="nds-styles" rel="stylesheet" href="/assets/styles/index.css"></link>
Copy link

Choose a reason for hiding this comment

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

style: Consider using a relative path for better cross-environment compatibility

<style>
#root {
margin: 1rem;
Expand All @@ -24,3 +25,23 @@
/* THE ABOVE OVERRIDE IS PURELY FOR THE EXAMPLES IN STORYBOOK */
}
</style>
<script>
(function() {
const storybookEventSource = new EventSource(`${location.protocol}//${location.host}/__webpack_hmr`);
Copy link

Choose a reason for hiding this comment

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

logic: This EventSource might not be available in all environments. Consider adding a fallback

const newportStorybookStyles = document.getElementById('nds-styles');
storybookEventSource.onmessage = (event) => {
if (event.data) {
try {
const data = JSON.parse(event.data);
if (data.action === 'built') {
setTimeout(() => {
newportStorybookStyles.href = `/assets/styles/index.css?${Date.now()}`;
}, 250);
lizard-boy marked this conversation as resolved.
Show resolved Hide resolved
}
} catch (e) {
// ignore
}
Comment on lines +41 to +43
Copy link

Choose a reason for hiding this comment

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

logic: Silently ignoring all errors could hide important issues. Consider logging or handling errors

}
};
})();
</script>
22 changes: 7 additions & 15 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import { addParameters, addDecorator } from "@storybook/html";
import { withDesignTokens } from "../scripts/storybook/design-tokens";
// import { DocsPage, DocsContainer } from "@storybook/addon-docs/blocks";

// import { setCustomElements } from "@storybook/web-components";
// import customElements from "../custom-elements.json";

// setCustomElements(customElements);

import "../assets/styles/index.css";
import {
addParameters,
addDecorator
} from "@storybook/html";
import {
withDesignTokens
} from "../scripts/storybook/design-tokens";

addDecorator(withDesignTokens);
//addDecorator(withA11y);

addParameters({
options: {
Expand All @@ -19,8 +15,4 @@ addParameters({
showPanel: true,
hierarchySeparator: /\//
},
// docs: {
// container: DocsContainer,
// page: DocsPage,
// },
});
15 changes: 10 additions & 5 deletions .storybook/sass-watcher-plugin.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
const gulp = require('gulp');
const { watchPaths } = require('../scripts/watch');
const {
watchPaths
} = require('../scripts/watch');
require('../scripts/gulp/styles');

class NewportSassWatcherPlugin {
apply(compiler) {
let sassWatcher;
compiler.hooks.watchRun.tap('Newport Sass Compiler', () => {
const sassWatcher = gulp.watch(watchPaths.sass, gulp.series('styles:sass'));
if (!sassWatcher) {
sassWatcher = gulp.watch(watchPaths.sass, gulp.series('styles:sass'));

sassWatcher.on('change', function(obj, stats) {
console.log(`File ${obj} was changed`);
});
sassWatcher.on('change', function (obj, stats) {
Copy link

Choose a reason for hiding this comment

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

style: Consider using an arrow function for consistency with the outer function

console.log(`File ${obj} was changed`);
});
}
});
}
}
Expand Down
1 change: 1 addition & 0 deletions OSZenGarden.json

Large diffs are not rendered by default.

80 changes: 20 additions & 60 deletions docs/build-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,26 @@ Now log into your org, go to _Setup_ and search for _Static Resources_. Open the
- `Cache Control` - Choose `Public`

Hit _Save_ and it will create your static resource.
## 3.Setting the default Newport for your org
### 3.1 By Static Resource name

## 3. (105+ release) Setting the default Newport for your org
Go to Settings in your org and query for Custom Settings. Look for "UISetting", click "Manage" and add a new entry with the following values:
- `Name` - `newportStaticResource`
- `Key` - `NULL`
- `Value` - The name of your staticresource.

***NOTE:*** If you're in an OmniStudio package instead of doing this in "UISetting" instead you'll need to do it in "Omni Interaction Config" in the "Settings" of your org.

From release 105 upwards we've simplified how Newport can be overridden in an entire org using a single Custom Setting. For pre-105 orgs please see alternative steps using custom VF pages below.
### 3.2 By Static Resource URL

In a 105 org go to Settings in your org and query for Custom Settings. Look for "UISetting", click "Manage" and add a new entry with the following values:
Go to Settings in your org and query for Custom Settings. Look for "UISetting", click "Manage" and add a new entry with the following values:

- `Name` - `newportZipUrl`
- `Key` - `NULL`
- `Value` - You will need to go to the staticresource you uploaded in step 2. Right click on `view file` in your browser and from the context menu choose `Copy Link Address`:

***NOTE:*** If you're in an OmniStudio package instead of doing this in "UISetting" instead you'll need to do it in "Omni Interaction Config" in the "Settings" of your org.

![Preview tool](./docs/copy_link_address_of_static_resource.png)

Now paste this value into `Value` field and you will need to edit it to be in the format: `/resource/{sobjectid}/{ns_}ResourceName`.
Expand All @@ -40,67 +49,18 @@ So for example in my org my clipboard gave me: `https://vloc-ouidesigner-dev-ed-

Save this and load your omniscript with the Newport theme option. You should now see it with your custom version loaded. This will work the same for Cards using the URL parameter `vlocitytheme=newport` or in Vlocity Lightning components that set the `theme` to `Newport`.

### (105+ release) Other deployment options
### 3.3 Other deployment options

With 105+ release you can change the value in `newportZipUrl` to point to any hosted version of newport. This means you can deploy Newport to a CDN you might have and provide the address to it hosted there in the `value` field. The important thing to maintain is the directory structure of the zip `newport-design-system.zip` file. The Vlocity package will simply try to append the known directories to the value in `newportZipUrl`. So if you provide a CDN url like: `https://www.acme.com/cdn/newport`, then Vlocity will try to load the stylesheets from `https://www.acme.com/cdn/newport/assets/styles/vlocity-newport-design-system.min.css`.
You can change the value in `newportZipUrl` to point to any hosted version of newport. This means you can deploy Newport to a CDN you might have and provide the address to it hosted there in the `value` field. The important thing to maintain is the directory structure of the zip `newport-design-system.zip` file. The Vlocity package will simply try to append the known directories to the value in `newportZipUrl`. So if you provide a CDN url like: `https://www.acme.com/cdn/newport`, then Vlocity will try to load the stylesheets from `https://www.acme.com/cdn/newport/assets/styles/vlocity-newport-design-system.min.css`.

To re-iterate **do not change the folder structure and file names in the generated zip file**.

## Pre 105 release

In older releases there are several manual steps that need to be followed in order to switch to your custom version of Newport:

### Adding to a custom OmniScript Page

Now go to _Setup_ and search _Visualforce Pages_ and click _New_.

- `Label` - choose an appropriate name, for example `OmniScriptNDS`
- `Name` - Make a note of this you will need it for Step 4. I recommend leaving it as the default Salesforce generates for you.
- `Description` - Optional
- `Available for Lightning Experience, Lightning Communities, and the mobile app` - Check this
- `Require CSRF protection on GET requests` - Optional
### 3.4 Enforce use of scoped styles

For the contents enter:
If you want to always use Newport's scoped styles then you can set:

```
<apex:page standardStylesheets="false"
showHeader="false"
sidebar="false"
docType="html-5.0"
lightningStylesheets="true"
controller="vlocity_ins.VFPageControllerBase"
applyHtmlTag="false"
applyBodyTag="false"
language="{!$CurrentPage.parameters.LanguageCode}">
<html xmlns:xlink="http://www.w3.org/1999/xlink">
<head>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=0" />
<link rel="stylesheet" href="{!URLFOR($Resource.newportdesignsystem, '/assets/styles/vlocity-newport-design-system.css')}" />
</head>

<body >
<div ng-app="OmniScriptUniversal" class="vlocity via-nds">
<vlc-slds-lightning-banner title="OmniScriptTitle"></vlc-slds-lightning-banner>
<vlocity_ins:BusinessProcessComponent strOmniScriptId="{!$CurrentPage.parameters.designerPreviewId}"
previewMode="{!$CurrentPage.parameters.previewEmbedded}"
scriptLayout="newport"
strCSSFileList="[]" />
<script type="text/javascript">
var modules = ['vlocity-business-process'];
var myModule = angular.module('OmniScriptUniversal', modules);
</script>
</div>
<vlocity_ins:VFActionFunction />
</body>
</html>
</apex:page>
```

NOTE: If you're using our CMT package then change `vlocity_ins` to be `vlocity_cmt`. If you're using our PS package then change `vlocity_ins` to be `vlocity_ps`.

Hit _Save_.

Now head over to the _Vlocity Omniscript Designer_ and open your OmniScript. In the _Script Configuration_ find the _Visualforce Pages Available In Preview_ property and click _Add New Visualforce Page For Preview_. In the first column enter the `Name` of your Visualforce page from step 3. In the second column enter `c__{NAME OF YOUR VF PAGE}`. The `c__` is important for the designer to be able to load the Visualforce page.
- `Name` - `newportUseScopedStyles`
- `Key` - `NULL`
- `Value` - `true`

With the changes done, click the _Preview_ tab and on the top right change the drop down to be your Visualforce page name. You should now be looking at your OmniScript rendered with the newport css you generated!
This will ensure that the scoped css file is loaded. All rules in the scoped css file are prefixed with `.via-nds` class selector which means you also need that class in your DOM tree in a parent element to have the styles enforce. This is useful to ensure your newport styles to don't leak out and affect other parts of the page you're not expecting them to.
4 changes: 4 additions & 0 deletions docs/docs.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import gettingStarted from './getting-started.md';
import introToNewport from './introduction-to-newport.md';
import buildDeploy from './build-deploy.md';
import customizeAButton from './customizing-a-button.md';
import salesforceImagery from './salesforce-imagery.md';
import { renderAsMarkdown } from '..././../../scripts/storybook';

storiesOf(`${base}`.replace(/(^\/)|(\/$)/g, ''), module)
Expand All @@ -19,4 +20,7 @@ storiesOf(`${base}`.replace(/(^\/)|(\/$)/g, ''), module)
})
.add('How to customize a button', () => {
return customizeAButton;
})
.add('CSS Zen Garden - Creating the Salesforce Imagery customizations', () => {
return salesforceImagery;
});
Binary file added docs/newport-zen-garden-mountains0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/newport-zengarden-designer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/newport-zengarden-form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/os-import.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/preview-os-zen-garden-annotated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/preview-os-zen-garden.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/raw-zen-garden.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading