popcodeorg / popcodeorg/popcode

Console open state should be preserved when project persisted

Offen
#1,328 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug code quality
Vorherrschende Sprache
JavaScript
Sterne
191
Forks
143
Ø Merge
4 T. 11 Std.
Gemergte PRs (30 T.)
5

Beschreibung

Right now, the console is always closed when a project is loaded, even if it was open last time that project was modified. This is different from other UI components, whose minimization state is retained when a project is persisted and then loaded.

This is because the collection of minimized components is represented as a set of component names. This is fine as far as it goes, but it precludes adding new minimized components that are minimized by default (e.g. the console), because the absence of the console from the array in a saved project might mean either:

  1. The console is not minimized in this project, or
  2. The project was last saved before the console feature was introduced

To work around this, when loading a project from storage, we assume the second case and always add the console to the list of minimized components.

Instead, we should store the collection of minimized components as a Map whose keys are component names, and values are either true or false. Entries should only be present in the map if the user has explicitly hidden or shown a component; if an entry is not present, the appropriate default for the editor in question can be used (this logic should probably live in the React component layer).

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Persistenz und das Laden des Projekts nachzuverfolgen, und untersuche anschließend die React-Komponentenebene, auf der die Standardwerte für minimierte Komponenten angewendet werden. Bestätige, wie die gespeicherte Sammlung minimierter Komponenten serialisiert und wiederhergestellt wird. Als erledigt gilt die Aufgabe, wenn explizite ausgeblendete oder angezeigte Zustände erhalten bleiben, während fehlende Einträge den Standardwert des jeweiligen Editors verwenden, einschließlich der Konsole.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, react
Bereich
frontend
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.