popcodeorg / popcodeorg/popcode

Console open state should be preserved when project persisted

Open
#1,328 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug code quality
Dominant language
JavaScript
Stars
191
Forks
143
Avg merge
4d 11h
Merged PRs (30d)
5

Description

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).

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 tracing project persistence and loading, then inspect the React component layer where minimized-component defaults are applied. Confirm how the saved minimized-component collection is serialized and restored. Done means explicit hidden or shown states persist, while absent entries use each editor's default, including the console.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.