Description
Introduce a new *.widget file type in Eclipse Dirigible to define and generate reusable UI widgets based on configurable templates.
The goal is to standardize widget creation through a declarative JSON-based approach and integrate it into the existing generation framework, enabling developers to quickly scaffold widgets with predefined structures (UI, extensions, data bindings, etc.).
Motivation
Currently, creating widgets (e.g. dashboard components, visual elements) requires manual implementation of UI, data binding, and supporting logic. This leads to:
- Repetitive boilerplate code
- Lack of standardization across applications
- Slower development and onboarding
A dedicated *.widget model with generation support would:
- Improve developer productivity
- Encourage consistency and reuse
- Enable future extensibility (e.g. visual editors)
Proposal
-
New File Type: *.widget:
- Introduce a new artifact type: *.widget
- The file content should be JSON-based and describe:
- Widget type
- Data source configuration
- UI-related metadata
- Additional configuration parameters
{
"type": "graph",
"title": "Revenue Overview",
"data": {
"source": "service",
"uri": "/services/ts/sample-app/api/revenue.ts"
},
"options": {
"chartType": "line",
"xAxis": "date",
"yAxis": "revenue"
}
}
-
Widget Generation Wizard
- Extend the generation framework to support widget generation from
*.widget files.
- During generation, the user should be able to:
- Select a Widget Template from a predefined list
- Configure:
- Widget name/title
- Data source type:
- Static data
- Service-based (URI input)
- Template-specific options
-
Widget Templates (Initial Set) Provide an extensible set of widget templates, including (but not limited to):
- Basic Widgets:
- Number (KPI display)
- Text (static/dynamic content)
- Visualization Widgets:
- Graph:
- Line chart
- Bar chart
- Pie chart
- Area chart
- Gauge (progress, KPI thresholds)
- Data Widgets:
- Table (tabular data with pagination/filtering)
- Additional:
- Card (composite widget with title, icon, and value)
- List (simple or grouped list view)
- Timeline (event-based visualization)
- Heatmap
- Progress Bar
- Status Indicator (e.g. success/warning/error states)
- Map (geo-based visualization, future extension)
-
Generated Artifacts Based on the selected template, the generator should create:
- UI components
- JavaScript controllers
- Data binding logic
- Extensions/Extension Points
-
Data Source Configuration Support two primary data source modes:
- Static Data
- Embedded JSON within the widget definition
- Dynamic Data
- Service URI (REST endpoint)
Future Enhancements
- Visual Widget Editor for designing and previewing widgets
- Live preview during configuration
- Drag-and-drop dashboard integration
- Theming and styling support
- Integration with existing dashboard capabilities (e.g. grouping, ordering, etc.)
Acceptance Criteria
Description
Introduce a new
*.widgetfile type in Eclipse Dirigible to define and generate reusable UI widgets based on configurable templates.The goal is to standardize widget creation through a declarative JSON-based approach and integrate it into the existing generation framework, enabling developers to quickly scaffold widgets with predefined structures (UI, extensions, data bindings, etc.).
Motivation
Currently, creating widgets (e.g. dashboard components, visual elements) requires manual implementation of UI, data binding, and supporting logic. This leads to:
A dedicated
*.widgetmodel with generation support would:Proposal
New File Type:
*.widget:{ "type": "graph", "title": "Revenue Overview", "data": { "source": "service", "uri": "/services/ts/sample-app/api/revenue.ts" }, "options": { "chartType": "line", "xAxis": "date", "yAxis": "revenue" } }Widget Generation Wizard
*.widgetfiles.Widget Templates (Initial Set) Provide an extensible set of widget templates, including (but not limited to):
Generated Artifacts Based on the selected template, the generator should create:
Data Source Configuration Support two primary data source modes:
Future Enhancements
Acceptance Criteria
*.widgetfile type is supported in the IDE