Passing Content Down to a Sub-Component

0 Kudos

Below the Pattern Markup of a component, in the Component Details list, each subcomponent has a few "options" baked in, such as "Label Override" and "Message Field".

Component details current exampleComponent details current example

 

These options should be expanded to allow for greater developer control:

  • A field that would pass the value as a parameter to the ComponentInput, ComponentPostInput, and ComponentOutputmethods.
  • Even better would be a special method or class we could use in ComponentInput(something like Input.StartComponentDetailsPanel()) that would let us create an entire custom expand panel.
    • This would allow for further customizing the passing parameters using dropdowns, radio buttons, etc.
    • These parameters and values could then be accessed like an asset DetailsPanel["button_options"]
  • A third improvement would be to allow us to pass content from the parent component to the subcomponent, similar to passing props or state in React
    • This could give us the option to create fully autonomous sub-components, that replicate content based on what the User has already entered. 
    • For example, if a user used an AcquireDocument input on a parent component, and we passed that information down, we could create independent subcomponents that created a link to this document, and another that showed the title, extension, and filesize as a toast.
    • UX wise, you would use the component name (e.g. {heading}) as the parameter value

After this writeup, I am aware that some of these use cases are served with templates, however, I believe strongly in the modularity of components to be a better and more scalable solution.

 

ALSO, this WYSIWYG editor should support <code> tags

Tags (1)
3 Comments
AriWeissman
Director of UX
Director of UX

Thanks @emb-isaac 

Great thoughts. We'll continue to monitor this idea.

Could you clarify the last statement about 'WYSIWYG editor should support <code> tags'?

Best
Ari

emb-isaac
Returning Observer

@AriWeissman Sure, in this editor that I'm typing in right now, it has a "Source code" button. If you add <code> tags around certain words, it displays nicely in preview, but will strip those tags out before posting. I like using them to highlight code in the text, as I did in the original post, but I had to do that using Font and Text color

AriWeissman
Director of UX
Director of UX

@emb-isaac Got it.

I think that is a security feature of the platform. Standard users are prevented from using 'advanced' tags in message source code to prevent any malicious activity. I think the </> Code Sample option is meant as an alternative but I can see how it would not really fit with the way you wrote out your post. Glad you were able to find a workaround.