Repository navigation
Conversation
game.css had grown to ~1400 lines. It is now six files under public/styles/pages/game/ (base, hero, box, overlays, sidebar, route), each with its own responsive rules, loaded in order by the game template. The rules are the same: the computed styles of every element match the old file at desktop and phone widths, in the start, pause and game-over states. Closes #17
bin/check-file-length runs in the CI quality job and fails on any tracked file over 1000 lines, apart from generated ones (lock files, config/reference.php...). Files that were already too long get a temporary cap so they can't keep growing, each tied to the issue that splits it (#15, #16, #18). Documented in CONTRIBUTING.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué cambia
1.
game.cssdividido por secciones (Closes #17). El archivo tenía ~1400 líneas; ahora son seis enpublic/styles/pages/game/:base.cssprefers-reduced-motionhero.cssbox.cssoverlays.csssidebar.cssroute.cssCada archivo lleva sus propias reglas responsive, así que todo lo de una sección está en un sitio. La plantilla los carga en orden.
2. Regla nueva: ningún archivo de más de 1000 líneas.
bin/check-file-lengthcorre en el jobqualityde la CI. Excluye los archivos generados (lock files,config/reference.php…). Los que ya eran demasiado largos tienen un tope temporal para que no sigan creciendo, cada uno con su issue:render.js(#15),main.js(#16),main.cssysaved_routes.css(#18). Explicado en CONTRIBUTING.Cómo lo he comprobado
bin/check-file-lengthpasa, y falla con un archivo de prueba de 1001 líneas.Revisión
Me gustaría que este lo revisarais alguno de vosotros: @LetMeSleep8h @RanaKhan77 @Aaqibhafeezkhan. Abrid
/juegocon la rama en local y mirad si veis algo distinto, o comentad si la regla de las 1000 líneas os parece bien. Cualquier comentario es bienvenido 🙌@Aaqibhafeezkhan: tu PR #27 hace crecer
main.jsunas 36 líneas; sigue cabiendo dentro del tope temporal, así que no te afecta.