Commit Graph

43 Commits

Author SHA1 Message Date
Matt Godbolt
53c7dd328b Configure Biome import organiser with grouped imports (#8431)
Enable Biome's `organizeImports` with groups matching the original
ESLint `import/order` configuration:

1. **Node builtins** (`node:fs`, `path`, etc.)
2. *(blank line)*
3. **Third-party packages** (`express`, `@sentry/node`, etc.)
4. *(blank line)*
5. **Local/relative imports** (`../foo.js`, `./bar.js`, aliases)

This resolves the inconsistency where Biome wasn't enforcing import
grouping, meaning new files would lose the blank-line separation that
the old ESLint config enforced.

### Impact
- **354 files** updated out of 738 checked (~48%)
- **+188 / -240 lines** (net -52) — almost entirely single blank line
additions/removals between import groups
- No import reordering; purely group separator consistency

Fixes #7373

🤖 Generated by LLM (Claude, via OpenClaw)
2026-02-01 20:50:46 -06:00
narpfel
2229a31480 Ignore click events when selecting text and the event handler would cancel selection (#8413)
Resolves #8405.
2026-01-31 17:34:26 -06:00
Ofek
427bb145e1 Fix #8152: handle \0 lines as empty (#8348)
Browsers render lines with just \0 chars as zero-height. Treat them as
empty lines instead

Implementing the suggestion raised in the issue discussion.
2025-12-20 14:07:14 +02:00
Matt Godbolt
de31120810 Fix unhandled promise rejections in compiler and executor panes - Fixes COMPILER-EXPLORER-BY1 (#7836) 2025-06-21 14:52:04 +02:00
Patrick Quist
d0da32c241 Refactor artifact handling into shared ArtifactHandler class (#7825) 2025-06-20 12:00:01 +02:00
Mats Jun Larsen
47e8e6d3a7 Replace href=javascript:; with bootstrap link class (#7797)
Fixes #7792

Bootstrap styles `a:has([href])` as a link so the attribute had been
used in the past for things that aren't actually links, yet we want the
style for. It's better to just use `.link-primary` so it doesn't affect
the contents as discovered in #7792
2025-06-13 02:43:14 +09:00
Matt Godbolt
637564f389 Migrate to Bootstrap 5 (#7582)
This PR completes the migration from Bootstrap 4 to Bootstrap 5.3.5
following the plan outlined in
[docs/Bootstrap5Migration.md](https://github.com/compiler-explorer/compiler-explorer/blob/mg/bootstrap5/docs/Bootstrap5Migration.md).

## Migration Process

We followed a phased approach as documented in the migration plan:

1. **Phase 1: Dependency Updates and Basic Setup**
   - Updated Bootstrap from 4.6.2 to 5.3.5
   - Added @popperjs/core dependency (replacing Popper.js)
   - Updated Tom Select theme from bootstrap4 to bootstrap5

2. **Phase 2: Global CSS Class Migration**
   - Updated directional utility classes (ml/mr → ms/me)
- Updated floating utility classes (float-left/right → float-start/end)
   - Updated text alignment classes (text-left/right → text-start/end)

3. **Phase 3: HTML Attribute Updates**
- Updated data attributes to use Bootstrap 5 prefixes (data-bs-toggle,
data-bs-target, etc.)
   - Fixed tab navigation issues

4. **Phase 4: JavaScript API Compatibility Layer**
   - Created bootstrap-utils.ts compatibility layer
- Updated component initialization for modals, dropdowns, popovers, etc.

5. **Phase 5: Component Migration**
- Updated and tested specific components (modals, dropdowns, toasts,
etc.)
   - Fixed styling issues in cards and button groups

6. **Phase 6: Form System Updates**
   - Updated form control classes to Bootstrap 5 standards
   - Updated checkbox/radio markup patterns
   - Simplified input groups

7. **Phase 7: Navbar Structure Updates**
   - Updated navbar structure with container-fluid
   - Fixed responsive behavior

8. **Phase 8: SCSS Variables and Theming**
   - Added custom CSS fixes for navbar alignment
   - Verified theme compatibility

9. **Phase 9: Accessibility Improvements**
   - Updated sr-only to visually-hidden
   - Added proper ARIA attributes
   - Enhanced screen reader support

## Key Changes

- No more jQuery dependency in Bootstrap 5
- New prefix for data attributes (data-bs-*)
- Improved accessibility with ARIA attributes
- Updated positioning classes (start/end instead of left/right)
- Simplified input group structure

## Test Plan

1. **Navigation Testing**
   - Verify all dropdown menus open and close properly
   - Test mobile menu responsiveness
   - Check tab navigation in settings dialog

2. **Component Testing**
- Verify all modals open and close correctly (settings, share,
load/save)
   - Test tooltips and popovers
   - Check form controls in different dialogs

3. **Layout Testing**
   - Test responsiveness on different screen sizes
   - Verify proper alignment of elements
   - Check dark mode compatibility

4. **Specific Features to Test**
   - Compiler selection and options
   - Share dialog functionality
   - Settings dialog
   - Tree view (IDE mode)
   - Font selection dropdown

5. **Browser Testing**
   - Test in Chrome, Firefox, Safari
   - Test in mobile browsers

## Note on Further Improvements

After this migration is stable, we could consider Phase 12: removing
jQuery dependency entirely, as Bootstrap 5 no longer requires it. This
would be a separate effort.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-04-24 12:10:37 -05:00
Mats Jun Larsen
5eea63328f Migrate to Biome for linting and formatting (#7033) 2025-02-02 17:54:31 +00:00
Partouf
ea382a8aed fix #7083 2024-11-11 16:53:07 +01:00
Ofek
ab4b662ee0 Extra safety around executeParameters.args (#7028)
Hopefully fixes #7027
2024-10-27 09:09:44 +02:00
Patrick Quist
4fe8397fac Remote execution (#6700) 2024-10-26 17:42:22 +02:00
Ofek
c1985d64a1 Tsification binge #7 (#6974) 2024-10-25 12:19:04 +03:00
Ofek
e98d361127 Add display for internal compiler id (#7010)
Implement #6985
2024-10-24 14:28:51 +03:00
Ofek
2df8d32758 Tsify #6 (#6941)
Another tsification batch. 347 to go and I'm running out of easy fixes
:(
2024-10-22 21:41:44 +03:00
Mats Jun
6753449778 Simplify TypeScript types for JQuery elements (#6991)
_No functional changes intended_

The existing type functions a little like this:

"Take the intersection of all common properties of all values in
HTMLElementTagNameMap"

This very much just happens to be the same as HTMLElement, since that's
the declared base for all of the types in HTMLElementTagNameMap. This
small patch simplifies this type (and makes it significantly easier to
read the code)
2024-10-22 19:33:03 +09:00
Ofek
caca3ea6c7 Eliminate all google-analytics dead code (#6954)
<!-- 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-10-10 21:21:43 +03:00
Ofek
12f6bfcc12 Make pane-renaming central (#6772)
When each `Pane` (and others) create their own `PaneRenaming`, which
extends `EventEmitter.EventEmitter`, when one actor emits `renamePane`
no other actor can hear it.

This PR makes `PaneRenaming` stop using its own event emission, and
instead use the central `Hub` it now receives at its ctor.
2024-08-17 22:51:11 +03:00
Jeremy Rifkin
7db4a4d253 Horizontal scroll the entire execution pane (#6606)
Fixes #6210
2024-06-14 20:40:41 -05:00
Patrick Quist
d2c7a5222e Local/Remote Execution environment (#6413) 2024-05-26 22:09:01 +02:00
Jeremy Rifkin
c34b85c320 Ansi color theming (#5848) 2024-03-20 22:01:36 -05:00
Patrick Quist
0dd5f27dcc Fix executor pane url inclusion (#6164)
Fixes #4801

Similar to
d9030cf41e

The push was done too early when the files hadn't been populated yet
2024-02-19 17:59:38 -06:00
Patrick Quist
9c5a6d3d95 Clang time trace support in execution pane (#6139) 2024-02-14 19:09:31 +01:00
Matt Godbolt
758475b82a Update all the things (#5958)
Not updating `chai` as stuff breaks, but everything else...
2024-01-08 21:19:31 -06:00
Patrick Quist
d5fd1ae3a7 Fix shared state close issue (#5725) 2023-11-10 00:13:53 +01:00
Patrick Quist
455d92916a Execution with heaptrack (#5644) 2023-11-07 23:59:40 +01:00
Patrick Quist
4481bd0f3a Show up to date version for trunk compilers (#5571) 2023-10-15 15:56:43 +02: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
1d44b6d2b4 War on @ts-expect-error (#5171)
Following up on #5170, let's just get rid of @ts-expect-error and
@ts-ignore completely in the codebase. (Well almost)
On top of #5170
2023-06-18 15:21:50 -04:00
Jeremy Rifkin
764338eb21 Fix longstanding issue TypeError: e.map is not a function (#5170)
Fixes #4868
This took so long to track down. I am convinced `@ts-expect-error` is
*always an error*.
2023-06-18 15:12:03 -04:00
Jeremy Rifkin
60ce06b02f Improve cache handling on the frontend, cache executions on the backend, and improve controls on the exec pane (#5111) 2023-06-11 19:10:30 -04:00
Jeremy Rifkin
34292238c1 Identify unused imports during lint (#5130) 2023-06-11 17:35:59 -04:00
Jeremy Rifkin
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
Patrick Quist
079d495757 Compiler overrides (#5001) 2023-05-16 03:53:57 +02:00
partouf
458f3446be #4976 do compile when done initializing 2023-04-19 22:41:03 +02:00
Patrick Quist
4f0f64943a defer compilation by when still loading panes (#4976) 2023-04-19 22:06:48 +02:00
Jeremy Rifkin
55dc09017e Compiler Picker UI Improvements (#4849)
Alrighty, round 2!

This PR makes the compiler picker dropdown taller (max height is to the
bottom of the screen)

![image](https://user-images.githubusercontent.com/51220084/224517409-17706ba6-fe85-444a-ad3b-f244f66eea5b.png)

I've added a toolbar button for opening the popout as well as a button
when the dropdown is open:


![image](https://user-images.githubusercontent.com/51220084/224517304-6478fca5-7bc1-4f87-b2ae-e9091d7d48bc.png)

![image](https://user-images.githubusercontent.com/51220084/224517317-83468805-1e9d-4bc6-8a4f-8786325f1e7b.png)

Then the modal interface allows text searching, filtering by compiler
category, and filtering by compiler instruction set. In the future I'd
like to replace the instructionSet property with an architecture
property so the filtering here can be a little better.


![image](https://user-images.githubusercontent.com/51220084/224517348-9cf40866-c5af-4274-84ba-21eb640ab2ea.png)

Demo of the category filtering:


![image](https://user-images.githubusercontent.com/51220084/224517529-5370b3f9-9ad3-4340-838a-b2d0a47c7467.png)

The text filtering highlights results the same as tomselect does:


![image](https://user-images.githubusercontent.com/51220084/224517490-d0dfa6d0-9b61-4be4-8cc7-ca4a4729a532.png)

I moved the favorites permanently to their own column so compilers
aren't jarringly shifted around the screen when favoriting /
unfavoriting.

Also added media queries so the modal looks ok on smaller screens:


![image](https://user-images.githubusercontent.com/51220084/224517563-bdf409c1-7e3a-4c73-812b-f02179b55799.png)


![image](https://user-images.githubusercontent.com/51220084/224517574-07fa2c8b-67d2-496d-9174-b1343e22bd62.png)

I think the only other two changes from the first PR are now the active
compiler is highlighted like it is in the tomselect dropdown and I
figured out how to reliably focus the search bar on modal open. (Oh, and
now clicking a compiler actually does something!)

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2023-03-12 17:07:44 -04:00
Matt Godbolt
14eb2b0802 Bump to latest LRU library and use new clear() method (#4852)
Tested locally; read release notes, all seems good.
2023-03-12 12:58:52 -05:00
Jeremy Rifkin
ea107a5ff9 More work needed, thanks for the comments Ruben and Matt! :)
Revert "Compiler picker UI improvements (#4789)"

This reverts commit d4a8c2bdb2.
2023-03-07 10:46:33 -05:00
Jeremy Rifkin
d4a8c2bdb2 Compiler picker UI improvements (#4789)
Makes the compiler picker dropdown a bit taller, prevents the dropdown from overflowing the page, and also adds a compiler picker popup
2023-03-04 19:55:25 -05:00
Mats Jun Larsen
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
Patrick Quist
a15c725c4f Move url expansion to files (#4602) 2023-02-02 22:02:32 +01:00
Patrick Quist
c022ca8a6c rebased ts/executor (#4605) 2023-02-02 20:46:15 +01:00