question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Introduce preset components

See original GitHub issue

This is an idea and proposal to simplify the usage of several things.

The problem

Building a view using UI components is great, it makes it easy and fun. However there is one little issue that is kind of annoying and that you end up doing all over again: duplicated messages.

For example, when you build a form you usually need a Cancel and Save button. So you usually end up creating messages for those buttons because the UI components require you to pass a label. This happens for other things that are spread all over the different views. And of course you end up having A LOT of duplicated messages to be translated, when 99% of the cases might not be necessary.

image

The proposal

It would nice to have some sort of “preset” components that are translated and everything within the ui-kit, so that as a consumer we don’t need to care about all those messages again.

For example:

  • <CancelButton>
  • <SaveButton>

…and whatever other components might be useful.

Thoughts?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
tdeekenscommented, Nov 27, 2018

Can’t app-kit expose those?

export defineMessages({
   save: ...
})

and we do:

import { sharedMessages } from 'app-kit`
1reaction
emmenkocommented, Nov 23, 2018

We can either add a separate section for these types of components

Yes, that’s what I meant with the “preset” thingy. It’s just a grouping for such components.

Sidenote: I found the name “presets” quite confusing.

I know, I couldn’t find a better name to describe this 😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Component Presets for Contentful - Stackbit Docs
In this lesson, we improve the productivity of content editors by introducing component presets. This is a lesson within the Next.js + Markdown...
Read more >
Plot component presets
Introduction. PlotSquared v5.12.0 introduced a new component preset system. The new system allows server owners to make component presets that players can then ......
Read more >
Presets - Unity - Manual
Presets are assets that you can use to save and apply identical property settings across multiple components, assets, or Project Settings windows.
Read more >
Working with effect presets - Adobe Support
Premiere Elements includes several effect presets, which are common, preconfigured effects that you can apply to clips.
Read more >
Presets - Umajin Support
A Preset is an easy way to apply pre-defined styles to a component. For example, when you add a button, instead of configuring...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found