Commit Graph
40 Commits
Author SHA1 Message Date
Ofek c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Ofek 9857667ad1 The 2s-delay experiment was never deployed... Restoring it 2024-07-24 14:43:41 -04:00
Ofek 89c33d9d70 After a 10 day experiment, decrease defaultDelayAfterChange back (#6719)
… to 1.5sec
2024-07-23 18:43:00 -04:00
Ofek 2aa1101a86 Increase defaultDelayAfterChange to 2s (#6703)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2024-07-15 21:32:00 +03:00
OfekandAbril Rincón Blanco 68ebf251f8 Change the default delay before re-compilation from 750 to 1500 ms (fix #6669)
Co-authored-by: Abril Rincón Blanco <git@rinconblanco.es>
2024-06-29 23:44:09 +03:00
Jeremy db3076e0ab Rescue users from real dark mode 2024-04-09 20:20:18 -05:00
Mats Jun Larsen 06506166ff Sort settings language keys before presenting in ui (#5300) 2023-07-30 18:16:08 +02:00
Matt Godbolt e4b791ce92 Use session _then_ local storage for saved state (#5277)
In conversation with @mknejp he pointed out that it can be frustating
when having a browser loaded up with many tabs of CE links, then
reloading the browser (e.g. a reboot, or open/closing the tabs), that
upon reload all the tabs will have the same, shared state (corresponding
to whichever saved to local storage last).

This change:
- stores state in _both_ session and local storage
- removes from both on UI reset
- loads first from session storage and then falls back to local storage

The net result is:
- tabs reopened with "ctrl-shift T" will regain their prior state, as do
any other tabs for which the browser thinks are part of the same session
(like on a "reopen tabs" plugins etc)
- newly-opened tabs still have the prior behaviour of using whatever the
most recently opened tab had as its starting state

Some more info on session vs local storage
[here](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage)
2023-07-23 18:08:33 -05:00
Matt Godbolt 87024e2239 Bump latest deps (#5252) 2023-07-10 21:31:04 -05:00
Jeremy Rifkin 4260313e13 Common utilities and type work (#5200)
This PR refactors some common utilities out of lib/ and into shared/ and
eliminates some use of underscore.js, as well as general type
improvements done along the way.
2023-06-28 20:13:10 -04:00
Jeremy Rifkin 07c1cf632f Fix color scheme being overwritten on load (#5169)
Closes #2590
This took a lot of printbugging for such a simple fix. At least a 10:1
ratio of console.log to diff lines (not including the renaming in
fillColourSchemeSelector).
2023-06-18 15:04:02 +02:00
Jeremy RifkinandMatt Godbolt edcacc0272 Better compiler argument warnings handling (#5076)
The goal of this PR is to display any warnings about compiler arguments,
e.g. the warning about -march=native, somewhere else instead of a toast
notification every time. Feature requested on discord.


![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/40a0c670-b2bb-4fae-b98d-937dbeb7d2e6)

![Animation](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/43575608-daa6-487d-9ef9-ca04bdd38a38)

![image](https://github.com/compiler-explorer/compiler-explorer/assets/51220084/551e26e5-1e4f-4802-a68a-fb63e0e5e415)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-05-30 21:18:09 -05:00
Matt Godbolt 515c130300 Make bracket colourisation configurable. (#4863)
See microsoft/monaco-editor#3013 for ways this can be improved in future
2023-03-12 16:25:34 -05: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
Ross Brunton ba9fdedc8f Expose autoCloseQuotes and autoSurround editor settings (#4744) 2023-02-19 22:13:37 +00:00
Jeremy Rifkin 7e0c7fbd0c Fix some value handling in settings (#4644) 2023-01-26 11:06:45 -05:00
Jeremy Rifkin 41db591c54 Patch highlighting color scheme setting bug (#4622) 2023-01-20 11:12:46 +01:00
Jeremy Rifkin 7a7a1dd906 Quick fixes for bugs noticed while testing (#4596) 2023-01-14 02:07:43 -05:00
Jeremy Rifkin 33167a3024 Tsify main (#4520) 2023-01-13 19:52:00 -05:00
Jeremy Rifkin 07f37abe76 The War of The Types (#4490) 2023-01-13 19:22:25 -05:00
Jeremy Rifkin 7387fe73d7 Handle undefined theme in the site template widget (#4454)
* Handle undefined theme

* Fix comment
2022-12-18 10:51:24 -05:00
Rubén Rincón Blanco a4d08986e8 Allow line linkings to be highlighted forever (#4227)
Closes #3487
2022-11-02 14:54:49 +01:00
Rubén Rincón Blanco 9391f0aa44 Add keep status per tab setting (#3871) 2022-09-25 15:56:26 +02:00
Rubén Rincón Blanco e39ceee496 Add System theme setting (#4072)
* Set system theme as default
2022-09-21 16:23:31 +02:00
Mats Larsen 1f5fbe0e28 Replace provide-plugin jquery imports with import statements (#3943) 2022-08-07 11:58:16 +02:00
Rubén Rincón Blanco 712814f6b5 Adds way to disable executor recompilation on parameter change (#3862)
* Adds way to disable executor recompilation on parameter change

Now that this is here, maybe another toggle for tools would also be good
to have. Maybe even for the compiler itself.

And if we go that route, why not 1 for all three kind of panes?

Closes #3783

* Address PR reviews

Sometimes I wonder why I don't think of this things myself :)

* Do the state saving always
2022-07-18 14:18:22 +02:00
Jeremy Rifkin 204960d8fc Address #3705 (#3789) 2022-06-21 18:07:50 +02: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
Jeremy Rifkin 1fdba5e8c8 Resolve @typescript-eslint/no-unnecessary-condition warnings for settings.ts (#3510)
* Resolved @typescript-eslint/no-unnecessary-condition warnings for settings.ts

* Better handling of .val()
2022-04-14 03:50:14 +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
Rubén Rincón Blanco db229b94bc Add strict tsc flag for the frontend ts code (#3356) 2022-02-12 02:41:01 +01:00
Rubén Rincón Blanco c60cd70f7e Move static/themes.js to TypeScript (#3332)
* Rename themes.js to themes.ts

* TSfy themes

* Address PR review
2022-02-07 07:22:33 +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 Blanco 426aa40279 Fix formatOnCompile setting (#3314) 2022-02-02 03:48:50 +01:00
Luca Natilla 4af294d613 Option to create a short link with Ctrl+s silently (#3305) 2022-01-31 21:28:56 -06:00
Rubén Rincón Blanco fe7eb18408 Reimplement more options for Ctrl-S (#3300) 2022-01-31 14:03:38 +01:00
Mats Larsen 593a727445 Add setting for automatically formatting on compilation (#3302)
Adds a new checkbox setting for automatically formatting the code upon compilation request. I added a note in the setting text indicating that it only runs for languages that have a formatter set up.
2022-01-31 14:01:14 +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