feat(editor): Add missing documentation to autocomplete items for inline code editor (#5560)

*  Added documentation for extension functions with arguments

*  Adding custom autocomplete item types. This enables us to show different items with same labels.

* 📚 Adding missing info for extensions autocomplete items

*  Added Luxon autocomplete docs

* 💡 Completing Luxon static methods autocomplete documentation

*  Refactoring Luxon autocomplete logic

*  Handling the case when autocomplete item doesn't have defined inline documentation

*  Added correct doc info to Luxon instance properties

*  Added missing documentation and notice footer for autocomplete popup.

* 👕 Fixing lint error

* ✔️ Removing `Object.hasOwn` function, since it's not supported in node v14
This commit is contained in:
Milorad FIlipović
2023-02-28 05:34:03 +01:00
committed by GitHub
parent bb4db58819
commit ae634407a4
15 changed files with 1281 additions and 181 deletions

View File

@@ -1,3 +1,18 @@
.cm-tooltip-autocomplete:after {
display: block;
content: 'n8n supports all JavaScript functions, including those not listed.';
padding: var(--spacing-2xs) var(--spacing-s);
border-top: 1px solid var(--color-foreground-dark);
}
// Custom autocomplete item type icons
// 1. Native and n8n extension functions:
.cm-completionIcon-extension-function, .cm-completionIcon-native-function {
&::after {
content: 'ƒ';
}
}
.cm-tooltip-autocomplete {
background-color: var(--color-background-xlight) !important;