Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7335849c34
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <app-editor-toolbar | ||
| [languages]="state.languages" | ||
| [selectedLanguage]="state.selectedLanguage()" | ||
| (languageChange)="state.setLanguage($event)"> | ||
| </app-editor-toolbar> |
There was a problem hiding this comment.
Restore logout access in the workspace
In the authenticated challenge-workspace route, this replacement removes the only rendered user/logout controls; a repo-wide search shows no other logout UI, while logout() is still left on the container. After a user reaches the workspace they no longer have a way to sign out, so keep the auth controls in the header/toolbar while adding the editor toolbar.
Useful? React with 👍 / 👎.
| <app-editor-toolbar | ||
| [languages]="state.languages" | ||
| [selectedLanguage]="state.selectedLanguage()" | ||
| (languageChange)="state.setLanguage($event)"> |
There was a problem hiding this comment.
Wire or hide the inert toolbar actions
When this container renders <app-editor-toolbar>, it only listens to languageChange; the toolbar still shows Settings, Reset, and Expand buttons whose outputs are never bound here, so clicking any of those visible controls is a no-op for every workspace user. Bind those outputs to container behavior or do not render the buttons until they are implemented.
Useful? React with 👍 / 👎.
| background: #262626; | ||
| border: none; | ||
| outline: none; |
There was a problem hiding this comment.
Preserve keyboard focus on the language toggle
For keyboard users tabbing through the editor toolbar, this removes the browser focus ring from the language button without adding any replacement :focus-visible styling. The control still receives focus and opens the menu, but users cannot tell where focus is, so keep the outline or provide an explicit visible focus state.
Useful? React with 👍 / 👎.
|
|
||
| readonly languages: LanguageId[] = [ | ||
| 'javascript', | ||
| 'python' |
There was a problem hiding this comment.
Don't offer Python before starter code is wired
With this new python option in the rendered language list, selecting Python only changes selectedLanguage; the editor surface still renders the single challenge().editorSnippet from the Two Sum fixture, which is JavaScript. Users can therefore put the toolbar into Python while the code area remains JavaScript starter code, so either wire per-language source updates before exposing Python or keep the list to languages the editor can actually display.
Useful? React with 👍 / 👎.
| border-bottom: 1px solid #2a2a2a; | ||
| } | ||
| display: grid; | ||
| grid-template-columns: 1fr 1fr; |
There was a problem hiding this comment.
Let the toolbar stack on narrow screens
On viewports below the existing 900px breakpoint, .workspace-main switches to one column but this toolbar still forces the tabs and the new editor toolbar into two half-width columns. The editor toolbar's language selector plus three icon buttons need more than a phone-width half column, so the controls overflow or get clipped by .workspace-layout { overflow: hidden; }; add a matching responsive rule for the toolbar instead of keeping 1fr 1fr at small widths.
Useful? React with 👍 / 👎.
En este PR se implementa la barra de herramientas del editor (editor-toolbar) para el workspace de desafíos.
Cambios realizados:
Se creó el componente editor-toolbar.
Se definió el tipo LanguageId para los lenguajes soportados.
Se implementó un selector de lenguaje con menú desplegable personalizado.
Se agregó el estado local para gestionar el lenguaje seleccionado.
Se implementó la comunicación entre el toolbar y el contenedor mediante eventos.
Se añadieron las acciones básicas del editor (configuración, reiniciar y expandir).
Se integró al componente en challenge-workspace.
Se ajustaron los estilos y la distribución para seguir el diseño de Figma.
Se agregaron pruebas unitarias para la selección de lenguaje y las acciones del componente.
Closes #6