Skip to content

Android configuration widget #197

@Angelk90

Description

@Angelk90

Feature Description

When adding a widget, it would be nice to be able to customize it based on information.
Let's take a weather widget.
When inserted, a React Native view should open, asking which city you want to display and other editable information.

Problem Statement

Being able to customize a widget.

Proposed Solution

import type { VoltraConfig } from 'voltra'
import WeatherConfig from './widgets/WeatherConfig'

const config: VoltraConfig = {
  android: {
    widgets: [
      {
        id: 'weather',
        displayName: 'Weather',
        description: 'Show weather for a selected city',
        targetCellWidth: 3,
        targetCellHeight: 3,

        configWidget: WeatherConfig,
        defaultState: {
          city: 'New York',
          units: 'metric'
        }

      }
    ]
  }
}

export default config

Alternatives Considered

No response

Current Library Version

1.4.1

Implementation

  • I would be willing to submit a pull request for this feature

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions