OpenFn / OpenFn/lightning

Refactor `Lightning.Extensions.Message` to contain `component`

Open
#3,057 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Details

https://github.com/OpenFn/lightning/pull/3038 introduced a %LightningWeb.DynamicComponent{} struct which keeps track of the function and args needed for a dynamic component.

https://github.com/OpenFn/lightning/pull/3035 adds a banner but still uses a map instead of the types struct. https://github.com/OpenFn/lightning/pull/3035 still uses a map because %Lightning.Extensions.Message{} is used by the billing app to display banners.

This issue therefore suggests that we refactor Lightning.Extensions.Message to be:

@type t :: %__MODULE__{
          position: atom() | nil,
          text: String.t() | nil,
          component: LightningWeb.DynamicComponent.t() | nil
        }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Lightning.Extensions.Message and reading its usages, especially the billing app banner path. Compare the DynamicComponent change in PR 3038 with the banner work in PR 3035, then identify the map-based message construction that must use the component field. Done means the message type and its callers consistently support LightningWeb.DynamicComponent without breaking banner display.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.