sfccdevops / sfcc_developers_core Goto Github PK
View Code? Open in Web Editor NEWSFCC Developers Core Cartridge. A Salesforce Commerce Cloud (Demandware) Cartridge for Developers.
License: MIT License
SFCC Developers Core Cartridge. A Salesforce Commerce Cloud (Demandware) Cartridge for Developers.
License: MIT License
Revert the folder structure back to what is originally was.
Issue will be considered complete when the following criteria are met:
./cartridges/rvw_dev_console
Description
In SFRA version I get the following:
Wrapped com.demandware.beehive.core.internal.template.ServletAbortException: Requested template 'dev_console/index' not found! (rvw_dev_console/cartridge/controllers/Console.js#25)
In SiteGenesis version,
I get the following error:
An Error Occurred!
We're sorry that your order could not be placed. This probably happened due to a very high order volume or temporary connection errors. Please wait a few minutes and resubmit your order. We won't process your payment until your order is placed successfully. If you have further questions, please contact us via [email protected]
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Console Window Editor should open
Storefronts that have a CSS selector targetting all a tags with a text-decoration:underline can inadvertently add an underline to the Open Info icon in the toolbar.
Add the following CSS to observe the issue:
a {
text-decoration: underline;
}
An underline is not visible for the Open Info icon in the toolbar
No response
No response
No response
Downloading any of the files listed in the Assets section of a release results in an archive that is missing package.json. package.json is required to appropriately register the hooks needed to collect and render the toolbar and it's contents.
its
Clicking on the download button in the README takes you to the following page
https://github.com/sfccdevops/sfcc_developers_core/releases/tag/v1.3.0
Download either of the files listed under "Assets". The resulting archive will be missing the following file:
sfcc_developers_core/cartridges/sfcc_dev_tools/package.json
The following file is part of the downloaded archive:
sfcc_developers_core/cartridges/sfcc_dev_tools/package.json
No response
No response
No response
Next to the Theme Selection, it would be nice to have a way to switch the layout to whatever mode is needed. Currently we are Split Screen 100% of the time, but it would be nice to be able to also choose to just see the Editor, or the Results panels ONLY. This becomes super helpful for long lines of text that get hard to read when there is a bunch of line wrapping, or in Raw JSON layout, no wrapping at all, and a LOT of scrolling is required.
Issue will be considered complete when the following criteria are met:
Screenshots, Attachments, Linked GitHub Issues, etc
So this is kind of what I was thinking layout wise... icons like this. Where we show a split, and maybe the left and right ones just have like super thin slivers for the side we plan on collapsing. If these were in a row next to the theme switcher, with the split screen in the center, this would be super sweet to change with ease.
It would be sweet to get a basic code linter setup on this project to make sure we are putting out consistent code quality.
Issue will be considered complete when the following criteria are met:
eslint
to the projectnpm test
to run linterThe SFCC Dev Tools cartridge was previously installed on our system and was updated to the latest release (v1.4.0). Proper installation steps were taken, yet when the upgrade was deployed to our development environment, there appears to be no benchmark data shown (see screenshot below).
Further testing on local Sandbox & deployed Staging environments appear to show the Benchmark feature working as expected with the default route & remote-include calls being properly benchmarked. This appears to be the same case for custom benchmarks as well. There are no errors being thrown on page load, nor warnings that indicate any issue with the cartridge.
In order to diagnose the issue, we have already taken the following steps after upgrading:
Given that the feature appears to only be broken in the Development environment, we believe that this is likely a configuration issue, preventing default calls to be benchmarked. Any steps or insight into what might be the source of this behavior would be appreciated.
N/A - Unable to fail benchmarks purposefully in non-Development environments without making changes to the cartridge itself.
Default benchmarks are shown and recorded
Image of Development environment w/ Benchmarks not shown
- Node:16.19.0
- npm:8.19.3
No response
It would be nice to be able to support more than one tab at a time so you can have multiple files open, and switch between them, without being forced to close one file you might be working on just so you can open another.
Issue will be considered complete when the following criteria are met:
Any additional notes from developers or QA required to complete this issue.
Here is an existing example for the editor we are using and how they handle multiple tabs. While it does handle switching content, etc, it does not cover tracking file modification, nor does it handle size / layout requirements we have. So mostly just a good jumping off point.
I think it is 100% OK to leave this out as a requirement for a v1.0.0 release. I think it is fine if this comes after our first public release.
const server = require('server');
Any reason why server module is being used? For such a simple controller you could've used the "raw" SFCC APIs. This would've made the cartridge work anywhere, be standalone and not be dependent of SFRA anymore.
The translated controller would be something like this:
"use strict";
/**
* Display development console template
*/
function Show() {
var URLUtils = require("dw/web/URLUtils");
var System = require("dw/system/System");
var ISML = require("dw/template/ISML");
if (!request.isHttpSecure()) {
response.redirect(URLUtils.https("Console-Show"));
return;
}
// We only allow on DEVELOPMENT_SYSTEM and disallow on STAGING_SYSTEM as well
// since that is just as sensitive as PROD (due to data replication)
if (System.getInstanceType() !== System.DEVELOPMENT_SYSTEM) {
response.setStatus(418);
response.getWriter().print("I'm a teapot!");
return;
}
ISML.renderTemplate("dev_console/index", {
urlPath: URLUtils.https("").toString() + "/default",
staticPath: URLUtils.staticURL("/").toString(),
});
}
module.exports.Show = Show;
module.exports.Show.public = true;
/**
* Run the script and return the response
*/
function Run() {
var URLUtils = require("dw/web/URLUtils");
var System = require("dw/system/System");
if (!request.isHttpSecure()) {
response.redirect(URLUtils.https("Console-Show"));
return;
}
// We only allow on DEVELOPMENT_SYSTEM and disallow on STAGING_SYSTEM as well
// since that is just as sensitive as PROD (due to data replication)
if (System.getInstanceType() !== System.DEVELOPMENT_SYSTEM) {
response.setStatus(403);
response.setContentType("application/json");
response.getWriter().print(
JSON.stringify({
error: true,
message: "Only available in SIG environments",
})
);
return;
}
const code = request.getHttpParameterMap().get("code").getStringValue("");
const maxDepth = request.getHttpParameterMap().get("maxDepth").getStringValue("");
if (!code || !maxDepth) {
response.setStatus(418);
response.setContentType("application/json");
response.getWriter().print(
JSON.stringify({
error: true,
message: "I'm a teapot!",
})
);
return;
}
let result = null;
try {
const myFunc = new Function("code", code);
result = myFunc();
} catch (e) {
result = e;
}
const serializer = require("../scripts/serializer");
result = serializer.serialize(result, maxDepth);
if (typeof result === "string" || typeof result === "boolean" || typeof result === "number") {
response.setContentType("application/json");
response.getWriter().print(JSON.stringify([result]));
return;
}
response.setContentType("application/json");
response.getWriter().print(JSON.stringify(result || {}));
}
module.exports.Run = Run;
module.exports.Run.public = true;
There appears to be a weird bug with Scrolling on the Results Pane. The JSON layout has one Scroll and the Tree view has another, and they do not seem to play well together on Windows. End result is that in Tree view, you see TWO vertical scrollbars.
Info about the Environment:
Issue will be considered complete when the following criteria are met:
A step by step guide written for a person who might be looking at this for the first time:
return session
or something that generates a LOT of outputOn Windows Chrome, the Theme Selection ( and likely the Max Depth ) select lists have a White Font on a light colored background. On MacOS, this does not happen.
Info about the Environment:
Issue will be considered complete when the following criteria are met:
Currently, if you click a file in the file menu, the code is automatically executed. While initially that seemed like a good idea to me, @z1haze reminded me that most of the time, these files will be template code that require editing before they are run.
Issue will be considered complete when the following criteria are met:
A step by step guide written for a person who might be looking at this for the first time:
Before this gets used by too many people, it's probably best to make sure we have some sort of basic authentication that prevents anyone that does not have access to the sandbox Business Manager to run code on that instance.
Issue will be considered complete when the following criteria are met:
Console-Show
should be redirected to login to Business Manager firstConsole-Run
endpoints should receive either a 401 or 403 error messageSFCC does not have a super easy way to benchmark existing code partials.
Add a new Benchmark Tab to the Dev Tools Drawer that outputs benchmarking metrics.
Initial support would be ideal to have:
route:Start
to route:Complete
etc )dw.system.request.onRequest
etc )name
, parent
, type
, start
and duration
**
Summary of each metric:
name
- Custom name for profiler use to track progressparent
- Use the name
of another profile to make this a sub profiletype
- Used for Grouping Benchmarkstart
- Time in milliseconds profiling startedduration
- Total time in milliseconds it took to complete profileNo response
No response
Benchmark labels that contain a long number of query parameters cause display issues
<isinclude url="${URLUtils.url('ConsentTracking-Check',
'lorem', 'lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ornare, mauris sit amet fringilla commodo, neque ex accumsan enim',
'lorem2', 'lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ornare, mauris sit amet fringilla commodo, neque ex accumsan enim',
'lorem3', 'lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ornare, mauris sit amet fringilla commodo, neque ex accumsan enim'
)}"/>
The Benchmark label is truncated or otherwise contained so that other table columns are visible
No response
No response
Currently there are a LOT of ["function"]
properties being returned in the serializer. Mainly because I misunderstood what @z1haze was requesting when removing a checkbox that toggled this feature.
Issue will be considered complete when the following criteria are met:
["functions"]
should be removed from Serializer OutputDescribe the bug
OOTB SFRA session forms values are not showing up
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should show values behind form session values
Desktop (please complete the following information):
Additional context
Investigating bug that in the SFRA country and state is wiped out after adding new payment method and hitting CheckoutServices-SubmitPayment found out that plugin was not able to support me and show form values from the session on the page load.
The following part of the documentation is not clear:
Add the Dev Tools Drawer and/or Dev Tools Console to your Storefront
Also those links are not directing to any section of the documentation
https://github.com/redvanworkshop/rvw_developers_core/tree/develop/cartridges/rvw_dev_tools#dev-tools-drawer
https://github.com/redvanworkshop/rvw_developers_core/tree/develop/cartridges/rvw_dev_tools#dev-tools-console
Currently if you create a New File, any time you run the code in the editor, it updates the code in the file you have selected. Initially this was so you could create a new file, edit the code, and as soon as you ran it, it was saving the file to local storage. Future edits to the file also seemed like they would need to be updated. However, @z1haze correctly pointed out that most of these files should be acting as templates, and update them on run is not idea for these use cases.
Issue will be considered complete when the following criteria are met:
A step by step guide written for a person who might be looking at this for the first time:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.