Skip to content
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

Fixing instructions state when set to an empty string #1191

Merged
merged 3 commits into from
Feb 4, 2025

Conversation

loiswells97
Copy link
Contributor

@loiswells97 loiswells97 commented Feb 4, 2025

This is fixing a bug where the user deletes everything in the instructions box and it suddenly switches back to the empty instructions state. This was caused by the fact that an empty string is falsy in Javascript, so when the instructions content was deleted we would get projectInstructions = "" which resulted in the instructions being deleted.

@loiswells97 loiswells97 temporarily deployed to previews/1191/merge February 4, 2025 16:24 — with GitHub Actions Inactive
@loiswells97 loiswells97 temporarily deployed to previews/1191/merge February 4, 2025 16:28 — with GitHub Actions Inactive
@loiswells97 loiswells97 self-assigned this Feb 4, 2025
@loiswells97 loiswells97 added the bug Something isn't working label Feb 4, 2025
Copy link
Contributor

@danhalson danhalson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@loiswells97 loiswells97 merged commit 4bb2f9a into main Feb 4, 2025
8 checks passed
@loiswells97 loiswells97 deleted the fix-instructions-empty-string branch February 4, 2025 17:28
@danhalson danhalson mentioned this pull request Feb 6, 2025
danhalson added a commit that referenced this pull request Feb 6, 2025
## What's Changed
* Support output tabs in pyodide by @loiswells97 in
#1157
* Downloading the instructions by @loiswells97 in
#1160
* Hack open function to write files in main thread by @loiswells97 in
#1146
* Try pinning previous ubuntu version to avoid cloudflare issue by
@danhalson in
#1178
* Integration: Save / Login functionality not as expected by
@create-issue-branch in
#1162
* HTML audio video support by @loiswells97 in
#1179
* Feat/editable instructions by @loiswells97 in
#1166
* Add remove instructions button modal by @jamiebenstead in
#1176
* fix dark mode colours by @conorriches in
#1182
* Copy change: Project steps to Project instructions by @loiswells97 in
#1183
* Fixing padding for first line of code block by @loiswells97 in
#1184
* Fix contrast on dark mode instructions code block by @loiswells97 in
#1187
* Markdown changes by @jamiebenstead in
#1188
* Remove line from demoInstructions by @jamiebenstead in
#1189
* Instructions syntax highlighting for CEfE by @loiswells97 in
#1190
* Fixing instructions state when set to an empty string by @loiswells97
in #1191
* Identify caching issue for editor-ui by @create-issue-branch in
#1186

## New Contributors
* @jamiebenstead made their first contribution in
#1176

**Full Changelog**:
v0.28.14...v0.29.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants