Commit Graph

332 Commits

Author SHA1 Message Date
EllipticEllipsis 9a402d70c5 Pascal language support (ido7.1Pascal compiler) (#570)
* Add 4 minimal IDOs and a "language" compiler flag

* Update recomp version

* Add compilers to list and json

* Add presets and remove alphabetical sorting

* Remove extra C IDOs

* Convert language to an enum

* get_file_extension function

* Review

* Proper Pascal test

* Auto-imports grr...
2022-10-27 11:47:45 +09:00
EllipticEllipsis c58ff1c2cb Add custom-built cc1 for SN64 (#569)
* Add custom-built cc1 for SN64

* Update flags

* Fix to use old cpp

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>

Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
2022-10-25 11:03:23 +09:00
EllipticEllipsis 80f74bbe72 New SN64 compiler (#566)
* Add compiler with Wiseguy's new preassembler

* Change some presets

* Release link and fix path

* Add to _all_compilers

* Work around lack of executableness

* 3

* Try with as

* O
2022-10-22 08:36:20 +09:00
Ethan Roseman 4eb5d2ed48 Add -gdwarf-2 flag to PM 2022-10-17 19:27:39 +09:00
Alex Bates 2e96373ac7 Projects list, creation, settings pages (#542)
* add projects list

* new project page

* mypy

* allow '.' in github identifiers

* implement project create

* project settings

* disallow anons from being project members

* uploadable project icon

* docker attempt

* fix tests

* add tests

* add description form

* refactor to add useEntity and FieldSet

* move FieldSet out of subdirectory

* use same page for project tabs

* scroll up to UnderlineNav when tab changes

* stylelint

* configure vscode mypy extension

* mypy

* fix mypy and dmypy

dmypy does not support follow_imports=silent. Instead we explicitly
disable most checks for asm_differ and m2c, which
has the same effect

* remove redundant mypy flags

* FieldSet style tweaks

* give UnderlineNav horiz padding

* fix swr mutate of project header

* few tweaks to help docker (#550)

* eth changes

* use POST/DELETE rather than PUT for project members

* add migration

* fix pr creation

* simplify project platform derivation

Co-authored-by: Mark Street <22226349+mkst@users.noreply.github.com>
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-10-07 20:12:18 +09:00
Alex Bates 2ed8c4d599 disable dark reader browser extension (#557) 2022-10-04 20:49:39 +09:00
Alex Bates 303fc8c55d Fix mobile viewport bugs (#555)
* try and fix svh issue on chrome android

* remove compact layout

* stylelint
2022-10-01 08:03:44 +09:00
Alex Bates 00cf81c7b9 Fit scratch toolbar onto one row when possible (#548)
* refactor scratch actions to its own component

* move toolbar actions into nav area

* fit ScratchToolbar on one line where possible

* fix HydrationError

* reduce wasted space by calculating layout in js

* avoid layout shift when edit time changes

* move edit time next to scratch name

* stop showing "Active now" after time

* align edit time on baseline

* drop 'Edited' prefix
2022-09-21 17:20:44 +09:00
Alex Bates b17d647999 update next-pwa and next-translate (#549) 2022-09-21 16:10:15 +09:00
Alex Bates b46b318d38 #539 again (#541)
* Revert "Revert "Frontend performance/accessiblity tweaks (#539)" (#540)"

This reverts commit 01a6ad58d5.

* don't use swc
* make useCompilation error detecting more resilient
* add browserslist
* supply sizes prop to UserAvatar Image
* be less specific about error type
2022-09-19 14:42:59 +01:00
Mark Street 795022c7af Freeze lockfile in CI (#547) 2022-09-18 12:34:38 -10:00
ConorB 4c20bf69fa Switch line diff implementation (#543) 2022-09-18 07:52:15 -10:00
Ethan Roseman 01a6ad58d5 Revert "Frontend performance/accessiblity tweaks (#539)" (#540)
This reverts commit be2bb90c01.
2022-09-17 16:13:43 -04:00
Alex Bates be2bb90c01 Frontend performance/accessiblity tweaks (#539)
* update eslint for next.config.js

* add webpack-bundle-analyzer

* use next/future/image

* improve text contrast in various places

* render scratch page on server

* fix username color on user page

* add title to commit hash

* fix apple-touch-icon

* remove user-scalable=no

* oops
2022-09-17 15:15:03 -04:00
Alex Bates a427382596 Fix #536 (#538)
* fix asm/context not persisting on new page

Fixes #536

* make valueVersion a required prop

Will help avoid issues like this in the future
2022-09-17 15:07:10 -04:00
Alex Bates 85402fffd3 open index if hamburger is middle-clicked (#537) 2022-09-17 07:25:09 -10:00
Alex Bates 8ef3edba73 Use overlay scrollbars in CodeMirror (#534)
* move CodeMirror styles to css module
* use overlay scrollbars in Diff and CodeMirror
2022-09-17 15:44:54 +01:00
Alex Bates bd8d7c342e Move redecompilation to an editor tab & add fork diffing (#528)
* add lazy tab content rendering

* improve renderTab typing

* change decompilation modal to a tab

* diff decompilation against source code

* highlight different lines

* fix gutter to not mistakenly show removed lines

* clean up cod

* debounce decompilations

* diff code against parent scratch

* add compare forks setting

* fix breadcrumbs margin

* delay compare for editable codemirrors

* reduce rerenders when typing quickly

* add sanity check for doc-out-of-sync bug

* fix out-of-sync bug

* compare against fork parent when scratch is not modified

* make decompile tab dismissable

* fix stylelint
2022-09-15 21:38:23 +01:00
Alex Bates 57a406d311 fix range sliders on chrome (#532) 2022-09-15 11:43:04 +09:00
Alex Bates 1044d77e97 Fix scratch action icons having overflowing text on old Chrome (#530)
* fix scratch action icons having overflowing text on old chrome

* make the icons visible
2022-09-15 11:42:20 +09:00
Alex Bates 5abadc1596 Only request public_repo GitHub scope when making a PR (#529)
* remove public_repo requirement for login

* request public_repo on pull request create if needed
2022-09-15 10:34:06 +09:00
Alex Bates 485f6e64d2 Settings fixes (#527)
* give code font size setting a default

* fix range input styling on firefox
2022-09-14 22:58:51 +09:00
Matt Kempster 963179a9bf Allow submitting PRs from scratches (#391)
* [scratch][projects] Allow submitting PRs from scratches

* Fix up mypy and test

* Move .exists() call to get_dir() in GitHubRepo

* Fix tests

* Minor cleanup

* Frontend lint

* WIP of project function

* Get tests working again

* Move PR stuff to its own viewset

* Reform commit and PR titles

* Fix mypy errors

* Remove breakpoint

* fix

* fix tests

* mypy

* remove suspense from UserAvatarList

* fix tests after mypy

* mypy

* wip pr scratch basket

* implement pr basket

* adjust basket scratch padding

* require public_repo scope

* don't allow function to be added to pr basket twice

* fix pr backend

* only allow matched funcs to be added to pr

* add margin between attempt scratchlist items

* fix mypy issues

* fix eslint issue

* possibly fix test

* pr comments

* fix tests

* remove double import

* fix stylelint

* mock GitHubRepo.get_sha()

Co-authored-by: Alex Bates <alex@nanaian.town>
2022-09-14 13:59:57 +01:00
Alex Bates 935828bf35 Add appearance options (#523)
* add auto light theme

* increase editor contrast

* improve settings page, add theme picker

* don't rehydrate when clicking settings tab

* add code font family setting

* add code line height setting

* add code color scheme editor

* base selection/highlight colors on background not site theme

* add footer to settings page

* fix /settings links

* add color scheme presets

* fix lil bugs

* update diff colors

* darken light colorscheme bg

* 'Preferences' -> 'Settings'

* bump stylelint

* fix stylelint issues

* combine diff/code font size settings

* fix diff column distribution bug

Introduced in #520

* remove save/fork duplicate button from scratch toolbar right

* move compile button

* move settings button to nav

* allow styling cm gutter color

* fix editor height on settings

* act as sidebar when nav is toggled on large widths

* improve breadcrumb styling

* improve search styling
2022-09-14 12:15:23 +01:00
Alex Bates e012b47a01 Mobile fixes & new scratch toolbar (#520)
* new mobile nav

* desktop nav

* nav style tweaks

* fix new page

* use standard nav on scratch page

* prepare scratch layout for #266

* add fixme to defaultsize

* redesign ScratchToolbar

* add more links to nav menu

* don't display online marker on yourself

* disable user-scaling on scratch page

* fix small width overflow on index page

* disable scrolling on scratch page

* try fix codemirror teleportation bug

* fix #519

* patch over diff_flags type issue

* remove padding-right from loginstate

* responsive scratch layout

* fix warning

* remove progress bar

Was causing overflow-x issues

* use floating scrollbar on macos

* fix editor overflow
2022-09-13 23:57:05 +09:00
Alex Bates 483bea5833 Add stats to homepage (#521)
* add stats to homepage

* move stats to side
2022-09-13 22:54:59 +09:00
ConorB b026a2ef10 Implement colorful frog avatars for anonymous users (#517) 2022-09-03 19:21:38 +09:00
Ethan Roseman fa9bab2ec6 revert CompilationPanel changes 2022-09-03 12:18:11 +09:00
Ethan Roseman 8a71f42b02 Fix stylelint (#516) 2022-09-03 11:07:09 +09:00
Alex Bates 79adcdac2f Hide compilation issues panel (#514)
* click to hide compilation issues panel

* disable separator dragging when compilation is successful
2022-09-01 18:54:17 +09:00
Ethan Roseman ad89e81d0e Ability to delete scratches (#494)
* API for deleting scratches + some tests

* add ui to delete scratch

* use window.confirm instead of fancy modal

Co-authored-by: Alex Bates <alex@nanaian.town>
2022-08-31 12:27:18 +01:00
ConorB a473143fee Nicknames for anonymous users (#513)
* Begin implementing random pseudonyms for anonymous users

* Switch pseudonyms from [Adjective] / [Person] to [Adjective] / [Animal]

* Have the migration assign all users pseudonyms
(instead of lazily upon profile use)

* Tweak path handling, None checks
2022-08-30 22:24:12 +09:00
Marijn van der Werf ea6d016e85 Add SN64 compiler binaries (#511) 2022-08-22 07:03:09 +09:00
EstexNT 29d9c7ad51 Add Nintendo 3DS platform (#490)
Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-08-11 15:26:16 +09:00
Ethan Roseman fdc16806cc Updates (frontend, backend, tools) (#486)
* frontend+backend updates

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "291173ed"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "291173ed"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/m2c

subrepo:
  subdir:   "backend/m2c"
  merged:   "3a400164"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "3a400164"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
2022-07-05 04:07:54 +09:00
Ethan Roseman 6da849f409 Show diff flags for everyone (#479) 2022-06-14 00:05:26 +09:00
Simon Lindholm dc73a6e59a Highlight tokens in the diff view on click (#472)
* Highlight tokens in the diff view on click

* update style

* fix types

Co-authored-by: Alex Bates <alex@nanaian.town>
2022-06-11 22:38:04 +02:00
Christian 71c3b3841d [WIP] Add Mac OS X platform and compilers (#462)
* Backend: Implement Mac OS X Compilers

* [Mac OS X Compilers] Add Fallout 2 preset

* Refine Fallout 2 Preset

* Add svg

* Update Credits Page

* Rename gcc3 compiler

* Add unit test

* Try to fix unit test

* Try to appease the docker image

* Use tarball instead of zip for download macosx compilers

* Add another compiler -- gcc 4.0.0

* Add WIP preset for The Sims 2

* Revise svg

* Rename Mac OS X compilers to be more consistent

* [Compiler Rename] See description

PBX was an unofficial name for the Mac OS X Developer Tools that came before Xcode apparently, and in that era those tools shipped with every version of Mac OS X before 10.3 (Panther).
Although the earliest Developer Tools version to have this version of gcc3 I renamed is from May 2002, there wasn't an exact Mac OS X version that came out in May 2002, but in April 2002, Mac OS 10.1.4 came out. So, I am marking gcc3-1041 as  "GCC 3.1 (Mac OS 10.1.4) (C)".
Oddly, Apple's open source releases don't include gcc3 in their Mac OS 10.1.4 repository, but they do in their "Developer Tools May2002" repository.

* [Compilers] Update Sims 2 Preset

* Fix syntax conversion script

* Revise script to fix PIC jank

* [MACOSX] Added gcc-5363

* [download.py] only download convert_gas_syntax.py once
2022-06-06 07:06:37 +09:00
alex a16b010b2b use grid instead of flex in PlatformSelect (#463) 2022-06-04 04:11:04 +09:00
Ethan Roseman db03a48ef9 Revert the reversion of the updates (#459)
* Revert "Revert "Dep updates (#457)" (#458)"

This reverts commit eb43c51586.

* ci changes

* Update almost everything, fix issues

* add jest-environment-jsdom

* fix to mwcc debug info option

* remove frontend tests

* black

* remove eslint-plugin-testing-library

* Do db migration

Co-authored-by: Alex Bates <alex@nanaian.town>
2022-06-01 23:06:51 -04:00
Ethan Roseman eb43c51586 Revert "Dep updates (#457)" (#458)
This reverts commit 03ae189510.
2022-05-31 18:40:21 +09:00
Ethan Roseman 03ae189510 Dep updates (#457)
* Update python deps and remove extra stuff from mac compiler command

* git subrepo pull --force backend/asm_differ

subrepo:
  subdir:   "backend/asm_differ"
  merged:   "9b2b6ad5"
upstream:
  origin:   "https://github.com/simonlindholm/asm-differ"
  branch:   "main"
  commit:   "9b2b6ad5"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* git subrepo pull --force backend/mips_to_c

subrepo:
  subdir:   "backend/mips_to_c"
  merged:   "10184592"
upstream:
  origin:   "https://github.com/matt-kempster/mips_to_c"
  branch:   "master"
  commit:   "10184592"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* prep for mips_to_c -> m2c migration

* rename m2c directory

* update frontend deps
2022-05-31 18:33:26 +09:00
Christian a45f85a1c7 Fix errors with deployment (#454)
* Fix errors with deployment

* Add test_mac_mwcc

* [Docker] add binutils-powerpc-linux-gnu
2022-05-23 01:52:39 +09:00
Christian a7a2ac8e40 Add MWCPPC (Mac OS 9 cross compiler ran on windows) (#452)
* [Compilers] Add MWCPPC (CodeWarrior, mac os 9 ppc) compiler

* [Mac OS 9 Compilers] Fix compilation

* [Mac OS Compiler] Set up frontend

* [Credits] Give attribution to NiloGlock for Happy Mac SVG

* [Cleanup] Appease reviewdog and black

* [Compilers] Update Sims 1 preset

* [Compilers] Update mac os 9 compilers with gas converter hotfix

(the gas converter is the python script that converts the asm dumps to the gnu assembler syntax)

* [Compilers] Fix after code review

* [Compiler] make function param optional

* [MWCPPC] Use && instead of ;

* [MWCPPC] Change svg, set +x on compilers

(Accidentally removed the +x step when doing the change for the earlier review)

* [download.py] Fix oversight in moving MWCPPC
2022-05-23 01:11:59 +09:00
Mark Street fafba9c09d Add SN64 compiler (#451)
* Add SN64 compiler

* appease black

* Add BE flag to psyq-obj-parser

* Rename SN64 -> 'GCC 2.7.2 (SN)'
2022-05-13 21:57:38 +09:00
Ethan Roseman 0ba6803e83 Mario Kart Wii support (#444)
* Added compiler setup for MKW - Untested atm

* Updated download logic for _127

* Changed version _127 name to remove Metroworks 1.0 name

* Fixed compiler options strings

* exception catching for shlex

* cleanup + zbanks xargs fix

* cleanup

* Fix dll casing in download.py, warning filtering improvements, simon suggestion, typo

* Chmod to executable to the separately downloaded _127 compiler

* permit -w

* black and python updates

Co-authored-by: XOlifreX <olivier.luyckx@live.be>
2022-04-26 16:46:08 +09:00
Ethan Roseman 19efc2ede9 fix keyboard shortcuts (#443) 2022-04-18 19:18:04 +09:00
Alex Bates 705500b1af fix lint again 2022-04-13 15:37:35 +01:00
Alex Bates bc7b4cef63 fix lint 2022-04-13 15:34:25 +01:00
alex 9b31c9ebb8 Add family page & diff label editor (#438)
* add 'parent' url to TerseScratchSerializer

* add family page

* link to family in AboutScratch

* bump react-laag

* ui to edit diff label

* use User-Agent Client Hints API if supported

* fix pwa icons

* use carets instead of slashes between breadcrumbs

* use breadcrumbs on project function page

* fix save problem

* allow diff_label on compile

* a

* change placeholder

* new diff flags fix

* diff flags stuff

Co-authored-by: Ethan Roseman <ethteck@gmail.com>
2022-04-13 23:21:40 +09:00