Skip to content

02 encabezado y metadatos - #20

Open
notnohora wants to merge 4 commits into
mainfrom
02-encabezado-y-metadatos
Open

02 encabezado y metadatos#20
notnohora wants to merge 4 commits into
mainfrom
02-encabezado-y-metadatos

Conversation

@notnohora

Copy link
Copy Markdown

Descripción

En este PR se implementa el encabezado del reto (challenge-header) para el workspace de desafíos.

Cambios realizados

  • Se creó el componente challenge-header.
  • Se agregó el tipo ProblemMeta para modelar los metadatos del problema.
  • Se extendió ChallengeProblemDto con ProblemMeta.
  • Se renderizan el título, la dificultad, el número de aceptaciones, el engagement y el autor.
  • Se implementaron fallbacks para campos opcionales.
  • Se añadió el formateo de conteos (K y M).
  • Se incorporaron pruebas unitarias para el método formatCount.
  • Se integró el componente en challenge-workspace.
  • Se añadieron los íconos y estilos necesarios para seguir el diseño de Figma.

Closes #2

@notnohora
notnohora requested a review from Djkde01 July 4, 2026 16:34
@notnohora
notnohora requested a review from seqenenra08 July 5, 2026 20:53
@JGaviria0

Copy link
Copy Markdown
Member

@codex

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b4978cf595

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

padding: 8px 0px 16px 0px;
}
.title-container {
width: 591px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Let the header width shrink on narrow panels

When the workspace switches to one column at max-width: 900px, the problem panel can be much narrower than 591px (for example, a 390px mobile viewport minus the panel padding). This fixed title width forces horizontal scrolling even for short challenge titles, whereas the previous inline <h1> could shrink with the panel. Use a fluid width such as width: 100%/max-width or remove the fixed width so the challenge header remains responsive.

Useful? React with 👍 / 👎.

Comment on lines +23 to +24
if (value >= 1_000) {
return `${(value / 1_000).toFixed(1)}K`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Avoid formatting near-million counts as 1000.0K

For counts between 999,950 and 999,999, this branch runs before the million threshold but toFixed(1) rounds the displayed value up to 1000.0K. Because one more count renders as 1.0M, users see an inconsistent and misleading abbreviation at the boundary; choose the suffix after rounding or promote rounded 1000.0K values to the M format.

Useful? React with 👍 / 👎.

}
.title-container {
width: 591px;
height: 32px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Let long titles grow vertically

When a challenge has a title long enough to wrap, this fixed 32px container height still reserves only one line before the metadata row, so the second line of the <h1> overflows into or overlaps the meta controls. Challenge titles are user/content data and can be longer than the current fixture; let the title container use auto height instead of pinning it to a single line.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

US-02: Mostrar encabezado del problema y metadatos

2 participants