swagger-api / swagger-api/swagger-ui

Global getComponent injection

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

Nobody has claimed this yet.

type: feature
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Our handaround of getComponent is getting a bit out of hand these days...

A better solution would be to hijack getComponent to inject itself into the props of any component fetched through it, so it's available everywhere.

Care would need to be taken to make sure the getComponent function reference doesn't change over time, to avoid needless renders across the UI.

Contributor guide

Open the contributing guide

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 the getComponent implementation and the path used to fetch components. Determine how injected props should behave and how to preserve a stable getComponent reference; done means fetched components receive it without causing needless UI renders. No specific files or tests are named, so trace the existing component flow before defining the implementation and test scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.