Add a Copy code button to the final report
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 80/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- css, html, javascript
- Área
- frontend
Línea de trabajo
Empieza con el marcado del editor en web/interview.html y luego busca dónde web/interview.js configura el editor y sus manejadores de eventos. Añade un botón junto al editor que lea todo el texto del editor y lo escriba con la Clipboard API, mostrando un breve mensaje "Copied!", deshabilitándose cuando el editor esté vacío y capturando los errores de permisos. Dale estilo en web/styles.css para que coincida con los controles existentes. Está terminado cuando pegar en otro lugar produce el texto exacto y el contenido, el cursor y la selección del editor no cambian.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Currently, candidates need to manually select all text in the code editor and copy it using keyboard shortcuts.
Adding a "Copy code" button would provide a convenient way to copy the current solution for debugging, reviewing, or sharing after practice.
Expected Behavior
- Add a "Copy code" button near the code editor.
- Clicking the button copies the entire current editor content to the clipboard.
- Display brief feedback such as "Copied!" after a successful copy.
- Disable the button when the editor is empty.
- Handle clipboard permission errors gracefully.
- Preserve the editor content, cursor position, and selection.
Suggested Implementation
The relevant files are:
web/interview.html— Add the button to the editor interface.web/interview.js— Handle the copy action using the Clipboard API.web/styles.css— Style the button consistently with the existing interface.
Testing
- Enter code in the editor.
- Click "Copy code".
- Paste the clipboard contents into another text editor.
- Verify that the copied code matches the original, including whitespace and line breaks.
- Verify that clicking the button does not modify the editor content.
- Verify the behavior when the editor is empty or clipboard access fails.
Motivation
This small usability improvement reduces repetitive manual actions and makes it easier for candidates to review their code outside CodeTrial.
- Lenguaje dominante
- Rust
- Estrellas
- 160
- Forks
- 64
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 124
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sysprog21/codetrial
-
Candidate test cases persist across interviews for the same problem in the same tabPosiblemente ocupada @MZGamer la tomó hace 1 día. Abierto
sysprog21/codetrial#336 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
A correct C solution to Clone Graph does not compilePosiblemente ocupada @Wu-1127 la tomó hace 1 día. Abierto
sysprog21/codetrial#332 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Run the live interviewer on a local speech pipelinePosiblemente ocupada @alanhc la tomó hace 1 día. Abierto
sysprog21/codetrial#330 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Let the candidate undo Continue without camera in the preflightPosiblemente ocupada @HALA1028 la tomó hace 2 días. Abierto
sysprog21/codetrial#327 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Allow users to start an interview without GitHub sign-inPosiblemente ocupada @TMQ0717 la tomó hace 3 días. Abierto
sysprog21/codetrial#316 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de sysprog21/codetrial
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[Bug] ComponentType classifies 0x8A8A-0xEAEA as GREASE; mls-extensions §7.5 makes them private useAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
The book has a Nix install section that chelis.ch lacks, and it names two of the three systemsAbiertoarea:ecosystem documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Chelis-Lang/chelis#3866 ·
Los mantenedores suelen responder en 1 día
-
[安卓Feature]: 数字键盘左侧符号区域大小优化Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
metasequoiaime/msime#8620 ·
Los mantenedores suelen responder en 1 día
-
agent-detection macos p2 triaged
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día