Skip to content
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

[Feature] Custom widget #2033

Closed
riodeuno opened this issue Dec 5, 2020 · 31 comments
Closed

[Feature] Custom widget #2033

riodeuno opened this issue Dec 5, 2020 · 31 comments
Assignees
Labels
Community Reported issues reported by community members Enhancement New feature or request Epic A zenhub epic that describes a project New Widget A request for a new widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@riodeuno
Copy link
Contributor

riodeuno commented Dec 5, 2020

Summary

A way to include a custom component in Appsmith's canvas.

Motivation

Some tools require very specific types of widgets to display, represent and interact with data.

unknown

These types of widget functionality may not be available in the default set of widgets in Appsmith.
Having a way to include these in applications can be helpful.

Front logo Front conversations

@riodeuno riodeuno added Enhancement New feature or request Widgets Product This label groups issues related to widgets labels Dec 5, 2020
@Nikhil-Nandagopal Nikhil-Nandagopal removed their assignment Dec 7, 2020
@ofpiyush
Copy link
Contributor

Please read #2122 when we pick this.

@Nikhil-Nandagopal Nikhil-Nandagopal added Datasources Issues related to configuring datasource on appsmith and removed Datasources Issues related to configuring datasource on appsmith labels Dec 29, 2020
@mohanarpit mohanarpit added the Business Edition Features that will be a part of our business edition label Dec 29, 2020
@rishabhsaxena rishabhsaxena added the Community Reported issues reported by community members label Mar 24, 2021
@Nikhil-Nandagopal Nikhil-Nandagopal changed the title [Feature] Custom components [Feature] Custom widget Jun 24, 2021
@droggo
Copy link

droggo commented Sep 4, 2021

+1 for this feature

@github-actions github-actions bot removed the Widgets Product This label groups issues related to widgets label Sep 27, 2021
@Nikhil-Nandagopal Nikhil-Nandagopal added the Platform Administration Pod Issues related to platform administration & management label Oct 6, 2021
@hiteshjoshi hiteshjoshi self-assigned this Oct 11, 2021
@dgorshkov
Copy link

Hello! Could we please get an update on this?
It's marked as "Q1 2022" on the roadmap, but it's almost Q2.

@Nikhil-Nandagopal
Copy link
Contributor

@dgorshkov we haven't begun with this yet. Is there a widget you find missing?

@dgorshkov
Copy link

dgorshkov commented Jun 27, 2022

@Nikhil-Nandagopal Yes, we'd like to build a kanban board component.
BTW, congrats on the funding.

@sxwebster
Copy link

sxwebster commented Oct 9, 2022

+1 for this.

Sometimes there are things I want to do with other JS libraries beyond what is available in AppSmith -eg using something from HighCharts instead of FusionCharts. It would be excellent if I could write a wrapper to include HighCharts (for which I have my own license - thus not requiring you to get a distribution license as happened with Fusion Charts) and then provide data sources similar to how I would at the moment.

@pranavkanade
Copy link
Contributor

@hiteshjoshi @Nikhil-Nandagopal A user is asking for this feature so that they can have a tabulator widget - http://tabulator.info

@a-c-m
Copy link

a-c-m commented Nov 2, 2022

Adding a +1 here. The ability to create custom widgets (ideally with a searchable index on the appsmith or some 3rd party website) would be a huge improvement to the ecosystem and likely drive a lot of adoption.

I think https://github.com/appsmithorg/appsmith/blob/release/contributions/AppsmithWidgetDevelopmentGuide.md does a good job of showing how. But, to make this feature a true asset to appsmith, i think widgets need to be able to be imported / live outside the primary codebase, so they can be added adhoc in some kind of plugin system.

@dilippitchika
Copy link
Contributor

Hello folks, we are going to start work on this soon. I am looking for volunteers who can help us with understanding the problem statement better and what the workflow of your app and this new widget will look like. If anyone is interested in contributing to this project, please feel free to block a slot here - https://calendly.com/dilip_pitchika/30min

@a10k
Copy link

a10k commented Feb 5, 2023

Also, just a custom HTML block, where we can write some html snippet/use the {{}} to dynamically pass props to a web-component within it, while we add the libraries via script tag should be a great solution. Or is this already possible in the app somehow and I missed it, please help. Thanks!

@dilippitchika
Copy link
Contributor

Hey @a10k what are you trying to do in the custom html block? Can you please help me understand this?

@ahmetsevki
Copy link

Budibase has a nice plugin architecture which allows you to import into an existing deployment.

@Nikhil-Nandagopal
Copy link
Contributor

@ahmetsevki is there any reason you prefer manually uploading a component over writing the component code inside Appsmith itself as a widget?

@ahmetsevki
Copy link

ahmetsevki commented Mar 20, 2023

  • writing a custom react component in a screen provided by the appsmith app builder will be a bad dev experience. You will have to copy/paste code, you won't have the versioning of the component.
  • If you are going for a custom component like tooljet does that is rendered in an iframe, transpiled with babel, that would be a solution that transpiles at every component load, and won't scale. One bad move and your screen will freeze perhaps locking you out of your app (every time you try to edit your app, the browser perhaps would try to transpile many components)
  • What we should do is an admin screen where you can import plugins from a github repo. That repo will return a version and a schema. And you will import the distribution.js javascript file - compiled with react as peer dependency/not bundled to reduce size. Then load them on demand.
    • provide a skeleton project creator for developers that will create a custom component. The release file will be the compiled js + schema + version
    • developer creates a react component as default export, builds it in github actions
    • appsmith admin points to the repo, appsmith downloads it to server side, stores it
    • widget is made available on builder UI, upon construction sth like:
    // the following registers itself to window  with "window["##CUSTOM_COMPONENTS##"].push(plugin)"
    require('/tmp/someplugin/custom-component-index-built-by-custom-component-developer.js') 
    declare global {
        interface Window { "##CUSTOM_COMPONENTS##": Array<{name: string; component: FC<any>}>; }
    }
    const Button= window["##CUSTOM_COMPONENTS##"].find( c => c.name === 'myplugin').component
    const container = document.getElementById("somediv");
    const root = createRoot(container);
    root.render(<Button type='error' text='TryMe!' onClick = {() => {console.log('whaat')}}/>)

CREDIT: budibase implementation.

@Nikhil-Nandagopal
Copy link
Contributor

@ahmetsevki thanks for explaining the reasoning for not wanting the iFrame method. This will help build it better

@iamenrique
Copy link

iamenrique commented Mar 21, 2023

In the meantime, can you kindly confirm this guide is still valid and up-to-date? https://github.com/appsmithorg/appsmith/blob/release/contributions/AppsmithWidgetDevelopmentGuide.md

Reported here as well

@riodeuno
Copy link
Contributor Author

Hi @iamenrique! Yes, the APIs described in the guide should work.

We are looking to enhance the guide. So, please do share any suggestions you may have.

You can tag me or @rajatagrawal on GitHub, in case you have any queries when using the APIs described, or widget development in general.

We're also looking to add the property auto complete definitions to this guide, once the relevant changes have been merged into the code base.

@sbalaji1192
Copy link
Contributor

Closing this as we have introduced the custom widget on cloud and self hosted instances.

Documentation links:

  1. https://docs.appsmith.com/reference/widgets/custom
  2. https://docs.appsmith.com/build-apps/how-to-guides/Create-Custom-Widgets-Using-Iframe

@Nikhil-Nandagopal Nikhil-Nandagopal added the Widgets & Accelerators Pod Issues related to widgets & Accelerators label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Reported issues reported by community members Enhancement New feature or request Epic A zenhub epic that describes a project New Widget A request for a new widget Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

No branches or pull requests