Commit Graph
18 Commits
Author SHA1 Message Date
Ofek 9d8c503b3d Improve initialization of decorations in MonacoPane (#6426)
Make MonacoPane calls `createDecorationsCollection` in a single place
instead of forcing many subclasses to remember to call
`initDecorations`. Some subclasses never use DecorationsCollection and
call init for no reason now, but it still seems healthier - this avoids
the possibility of a MonacoPane subclass trying to use an uninitialized
decoration collection.

Also remove the depracated `deltaDecorations` from stack-usage-view.
2024-05-05 10:17:57 +03:00
Matthew Guidry 102b253f57 Add one dark theme (#6324)
Adds a new theme based on the One Dark theme from the Atom text editor.
Adds a new line highlighting theme "Soft Dark Rainbow" that works better
with the One Dark theme.
2024-04-06 23:30:39 -05:00
Jeremy Rifkin c2fa676a8e Create the real dark mode (#6309) 2024-03-31 19:41:51 -05:00
Ofek d2ee6e18a5 Replace the deprecated monaco.editor.ICodeEditor.deltaDecorations (#6078)
Replace the deprecated `monaco.editor.ICodeEditor.deltaDecorations` with `monaco.editor.IEditorDecorationsCollection`

Seems that today the official way of colouring monaco editors is having
them `createDecorationsCollection`, keep the resulting
decorations-collection and call `set` on it with new decorations
whenever needed.
There are many possible design choices on where to put it, I opted to
put `editorDecorations` in `MonacoPane`, and have
`MonacoPane.createEditor` initialize it only in panes where decorations
are actually used.
Also some signatures changed which had a broad (but non-interesting)
impact.
2024-02-04 18:12:53 +02:00
Ofek Shilon 266706f4c4 Revert "Remove usage of the depracated monaco.IEditor deltaDecorations (#6049)"
This reverts commit 9705843bb7.
2024-01-30 14:25:59 +02:00
Ofek 9705843bb7 Remove usage of the depracated monaco.IEditor deltaDecorations (#6049)
…in favor of createDecorationsCollection.
Minor drive-by cleanups.
2024-01-27 17:02:21 +02:00
Jeremy Rifkin 5d8d39f136 Pink (#4916) 2023-04-01 00:52:27 -04:00
Mats Jun LarsenandMatt Godbolt 633eb82d18 Transition to ECMAScript Modules (#4780)
Makes the Compiler Explorer app, and all the tooling ESM compatible.
Things that have been done:

1. The package.json has `type: module` now
2. All relative imports have a .js ending
3. All directory imports are now directory/index.js to comply with ESM
standards
4. Dependency node-graceful is now imported into tree, because the
package is broken under esm
5. Dependency p-queue has been bumped to 7.x with ESM support
6. Dependency profanities has been bumped to 3.x with ESM support
7. Webpack config is now both ESM and CommonJS compatible
8. Non-ESM compatible imports have been rewritten
9. ESLint configuration has been tweaked to not fail on .js imports
10. Mocha is now hacked together and ran with ts-node-esm
11. Webpack is now hacked together and ran with ts-node-esm
12. Webpack config is now ESM compatible, so that it can be used in the
dev server
13. Cypress code still runs commonjs, and has been excluded from the
tsconfig
14. All sinon mock tests have been commented out, because sinon module
mocks do not work with ESModules (because ESModules are immutable)

A lot of tests are now giving warnings/errors to stdout, yet still pass.
Docenizer codegenerator scripts have been updated, but I did not re-run
them, and instead just changed their code.

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-02-27 18:06:38 -06:00
Jeremy Rifkin 384c297906 Fix trailing comma issue (#4775)
Make trailing commas more consistent throughout the project, fixes
config conflict between eslint and prettier. Resolves an oversight in
#4766.
2023-02-26 12:21:35 -05:00
Jeremy Rifkin 14ddad0376 Jr/editor font size setting (#3670)
* Two quick code cleanups while I'm here

* Added default font size user setting

* Better addSelector solution

* Fix and clarification, thanks Ruben

* Updated typing

* Added font scale broadcast
2022-05-18 15:31:53 -04:00
Mats Larsen c199b54440 Enable Prettier for TypeScript frontend (#3524) 2022-04-20 22:39:10 +02:00
Rubén Rincón Blanco bc401f4ca0 Fixes settings handling in some places (#3400)
* Better handling for theme/colour scheme changes

Fixes #3396

* Fixes settings

* Fixes theme and colour scheme handling

Closes #3396

* Fix settings for embeded

Closes #3397

* Actually, just fallback to 0 if needed

* Lint fix

* Delete Deprecations.xml

* Better TS way
2022-02-24 14:55:54 +01:00
Patrick Quist 006aa6f4b7 [draft] Dark+ theme (#3339) 2022-02-17 21:18:44 +01:00
RabsRincon 370adddd30 Define themes only once 2022-02-08 08:37:56 +01:00
Rubén Rincón Blanco 42c7b2b694 Make eslint work on static ts files (#3304) 2022-02-03 18:04:50 +01:00
Rubén Rincón BlancoandMats Larsen f4315c561b Move static/settings.js to TypeScript (#3297)
* Rename settings.js to ts

* Move Settings to TS

* Remove underscore from settings

* Update static/settings.ts

Co-authored-by: Mats Larsen <me@supergrecko.com>

* Update static/settings.ts

Co-authored-by: Mats Larsen <me@supergrecko.com>

* Improve Settings implementation

* Move Settings interfaces to same file

* Update static/settings.ts

Co-authored-by: Mats Larsen <me@supergrecko.com>

Co-authored-by: Mats Larsen <me@supergrecko.com>
2022-01-29 02:00:10 +01:00
Mats Larsen ee0ff7185b Make colour.ts take Record<number, number> and refactor it to drop underscore.js (#3054)
* Make colour.ts take Record<number, number> and refactor it to drop underscore

* Move app theme into its own type
2021-10-30 15:41:58 +02:00
Markus f24c4efe4e Convert colour.js to typescript (#2991)
This will convert static/colour.js to typescript (see #2981)

Changes are pretty much the same as with the other conversions I did.

Assumed that param colours in applyColours is of type number[] as this is the only fitting type.

Signed-off-by: Markus <28785953+MarkusJx@users.noreply.github.com>
2021-10-03 23:26:59 +02:00