Skip to content

Ensure that editor tabs have corresponding files #2388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 26, 2023

Conversation

ianyong
Copy link
Member

@ianyong ianyong commented Mar 25, 2023

Description

Resolves the following issue that was raised by @zhaojj2209 in #2378:

  • When first turning on multiple files mode, program.js is not visible in the sidebar. The file will only appear in the sidebar after typing in some code and then reloading the page.
    telegram-cloud-photo-size-5-6104838078012175334-y

Also centralise the configuration of base paths of each workspace for better cohesion.

Part of #2176.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

How to test

The multiple files mode is not yet ready for production and is disabled programmatically. Enable multiple files mode for testing by changing the condition to false:

const toggleMultipleFilesModeButton = React.useMemo(() => {
// TODO: Remove this once the multiple file mode is ready for production.
if (true) {
return <></>;
}
return (
<ControlBarToggleMultipleFilesModeButton
isMultipleFilesEnabled={isMultipleFilesEnabled}
toggleMultipleFilesMode={() => dispatch(toggleMultipleFilesMode(workspaceLocation))}
/>
);
}, [dispatch, isMultipleFilesEnabled, workspaceLocation]);

It might be easier to verify this by opening an incognito tab in Chrome. Note that this does not work in Firefox where IndexedDB access is entirely blocked in private browsing mode.

@ianyong ianyong requested a review from zhaojj2209 March 25, 2023 11:53
@coveralls
Copy link

coveralls commented Mar 25, 2023

Pull Request Test Coverage Report for Build 4522526280

  • 3 of 18 (16.67%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 35.004%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pages/fileSystem/createInBrowserFileSystem.ts 3 18 16.67%
Files with Coverage Reduction New Missed Lines %
src/pages/fileSystem/createInBrowserFileSystem.ts 1 11.11%
src/pages/playground/Playground.tsx 1 2.89%
Totals Coverage Status
Change from base Build 4522515588: -0.03%
Covered Lines: 4728
Relevant Lines: 12585

💛 - Coveralls

@ianyong ianyong enabled auto-merge (squash) March 26, 2023 03:07
@ianyong ianyong merged commit b90a7a2 into master Mar 26, 2023
@ianyong ianyong deleted the ensure-that-open-editor-tabs-have-corresponding-files branch March 26, 2023 03:19
RichDom2185 pushed a commit to NUS-CS1101S/cadet-frontend that referenced this pull request Jul 15, 2023
* Create files that do not exist for editor tabs

* Consolidate workspace base paths into a single location

For better cohesion.
@coveralls
Copy link

coveralls commented Sep 22, 2024

Pull Request Test Coverage Report for Build 4519066109

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 18 (16.67%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.03%) to 34.856%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pages/fileSystem/createInBrowserFileSystem.ts 3 18 16.67%
Files with Coverage Reduction New Missed Lines %
src/pages/fileSystem/createInBrowserFileSystem.ts 1 11.11%
src/pages/playground/Playground.tsx 1 2.89%
Totals Coverage Status
Change from base Build 4508399233: -0.03%
Covered Lines: 4693
Relevant Lines: 12548

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants