-
Notifications
You must be signed in to change notification settings - Fork 24
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
ENDOC-502 Update the MFE config tutorial #520
Conversation
``` | ||
|
||
9. Set the **`Custom UI`** so it accepts the "name" config parameter. | ||
```javascript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is freemarker not javascript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use ftl here like the react.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use ftl here like the react.md
|
||
9. Set the **`Custom UI`** so it accepts the "name" config parameter. | ||
```javascript | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the start and end brackets, not needed in freemarker.
|
||
9. Set the **`Custom UI`** so it accepts the "name" config parameter. | ||
```javascript | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the start and end brackets, not needed in freemarker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, can't approve since it was my PR.
``` | ||
|
||
9. Set the **`Custom UI`** so it accepts the "name" config parameter. | ||
```javascript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is freemarker not javascript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this was applied in the latest commit ??
@@ -1,24 +1,24 @@ | |||
|
|||
# Add a Configuration Screen in App Builder | |||
|
|||
Entando widgets can be customized through an App Builder configuration screen that is itself a micro frontend. | |||
Entando widgets can be customized through an App Builder configuration screen that is itself a micro frontend. This tutorial splits the process into 3 steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'steps' >>Maybe change to stage or phase since there are multiple steps in each of them. Also change in headers below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried "phases" and "successive stages" and considered bullets or letters instead of a numbered list, but then decided "steps" was the clearest way to describe performing a sequence of actions.
the React root component (*App*). | ||
1. Replace the contents of `src/WidgetElement.js` with the following to add attribute handling to the custom element and re-render the app when an attribute changes. | ||
|
||
> Note: This enables the `name` attribute of the custom element to be passed as a property to the React root component (`App`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this note need to be in a note. It would work smoothly with the paragraph above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can see it either way. i think it also works as an aside, which allows the instruction to be more pointed.
@@ -81,26 +82,32 @@ export default WidgetElement; | |||
export default App; | |||
``` | |||
|
|||
3. For test purposes, edit `public/index.html` and set a value for the *name* attribute of the | |||
custom element. | |||
3. For test purposes, replace the contents of `public/index.html` with the following. This allows you to set a value for the `name` attribute of the custom element. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows you to set a value for the name
attribute of the custom element. >> how about highlighting that it can be set and reset at any time or set in the config screen in app builder, to forewarn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is hardcoded. at this point in the tutorial the user cannot change it in the config screen. this step is to confirm changing the visible text via the contents of this file
## Create a config MFE | ||
Next create a new MFE for managing the configuration option. These steps are very similar to the [previous tutorial](./react.md). | ||
6. Load the updated `my-widget` files into Entando as was done for the [previous tutorial](./react.md#upload-the-react-files) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop the comment about done for the previous tutorial. It's not necessary and it confused me more than helped.
Next create a new MFE for managing the configuration option. These steps are very similar to the [previous tutorial](./react.md). | ||
6. Load the updated `my-widget` files into Entando as was done for the [previous tutorial](./react.md#upload-the-react-files) | ||
|
||
> Note: If you followed the previous tutorial, only `js/main.GENERATED-ID.js` needs to be added or updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comment about this note, I was confused completely by what previous tutorial because I had done the React tutorial ages ago, or the reader may have a different widget. I thought maybe it was talking about the previous step/section. I think calling the React Tutorial 'previous' is very confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the link should clear that up. "the tutorial to create a React MFE" is a mouthful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed "previous" to "React MFE"
|
||
> Note: If you followed the previous tutorial, only `js/main.GENERATED-ID.js` needs to be added or updated. | ||
## Step 2: Create a config MFE | ||
Next, create a new MFE for managing the configuration option. These steps are very similar to the [previous tutorial](./react.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These steps are very similar to the previous tutorial. >> is this necessary, it wasn't helpful because I wasn't about to go look at that one anyway to see if it was similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
many people would. also, this tutorial is a natural extension / builds off of that tutorial
@@ -223,14 +230,16 @@ npm run build | |||
- `my-widget-config/static/css` | |||
- `my-widget-config/static/js` | |||
|
|||
6. Upload the css and js files from the corresponding directories under 'my-widget-config/build/static'. The generated id in each file name (e.g. '073c9b0a') may be different after each build. There may also be LICENSE.txt or .map files but they are not necessary for this tutorial. | |||
6. Upload the css and js files from the corresponding directories under `my-widget-config/build/static` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are 2 step '6's
@@ -223,14 +230,16 @@ npm run build | |||
- `my-widget-config/static/css` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent 3 spaces so these bullets can be indented, for smoother look. Same for the steps below
|
||
11. Fill out the "name" field and click `Save`. You can update the widget configuration at any point by clicking `Settings` from the widget actions in the Page Designer. | ||
9. Fill out the "name" field and click `Save` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step is too vague. I thought the config page was a preview and did not realize this is where you enter the name. Maybe I am the only stupid one but the note below really would have helped here. I don't think it takes away from the short step to include the note here.
11. Fill out the "name" field and click `Save`. You can update the widget configuration at any point by clicking `Settings` from the widget actions in the Page Designer. | ||
9. Fill out the "name" field and click `Save` | ||
|
||
> Note: You can update the widget configuration at any point by clicking `Settings` from the widget actions in the Page Designer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this should be in a note because it is REALLY important. I didn't pay attention to it because it was in a note. If this note had been in the previous step, it would have given a clarity about where to update the name.
No description provided.