Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive rating component

@AdanSaavedra

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hey I hope you all are okay, I would love if some one could explain me how I put the "you selected n out of 5" with the choice of the user, also y would like to receive suggestions or feedbacks in how to improve my solution in all aspects. ❤️

Community feedback

Danilo Blas 6,300

@Sdann26

Posted

Adan que tal!!

En lo personal creo que lo has hecho bastante bien, solo una recomendación cuando quieras hacer circulos evita hacerlo con padding porque es díficil que salgan perfectos porque este toma en cuenta lo que hay dentro, el contenido.

Por ejemplo modifique un poco para que salgan redonditos.

.numbers-container label {
  font-size: 15px;
  display: inline-grid;
  place-content: center;
  background-color: hsl(213, 19%, 24%);
  border-radius: 50%;
  color: var(--Medium-Grey);
  width: 41px;
  aspect-ratio: 1;
}

Acá cambie block por grid porque en grid es fácil centrar con place-content así centramos el valor en el medio. Quite el padding, y agregue width para que sea ancho y con aspect-ratio: 1 hago que la altura sea igual a la anchura. Esta ultima propiedad no es necesaria podría darle la altura a mano pero es interesante ya que sirve para conversar relación aspecto solo dando width o height jejeje. Por cierto tambien puedes agregar la animación para el cambio de color como te mencione en otro feedback.

Eso si, como te mencionó el comentario anterior ten en cuenta que no has usado javascript y masomenos deberías usarlo para este reto con el fin de obtener el valor en el radio button y pasarlo ya sea como has hecho a la otra página y que se muestre el valor, creo que sea hace con localStorage o sessionStorage o lo otro es hacerlo con manipulación del DOM, donde puedes eliminar o esconder la tarjeta y presentar la nueva con el valor. Yo lo hice de la segunda manera cuando desarrolle el reto pero bueno. Si deseas aprender javascript te puedo recomendar el canal de Dorian Desing es muy buen y tiene muy buenas practicas :D!

Marked as helpful

0

@AdanSaavedra

Posted

@Sdann26 Que hay Danilo, un gusto verte de nuevo por aquí!! Gracias por tu tiempo y por tus sugerencias, siempre aprendo algo nuevo contigo. Si, lo de obtener el valor del radio button me ha costado bastante, he estado buscando pero ninguna información me ha sido 100% util, así que gracias por informarme acerca del canal de Dorian Design, necesito ver sus videos jajajaj, gracias por todo Danilo y espero verte de nuevo por aquí.😄👍🏾

1

@Nghuynh07

Posted

@AdanSaavedra

Very nice job on the challenge. It looks good. To select the star, a solution to it would be to interact with the DOM. I see that your approach is using type="radio" with id #. Maybe you can select all the input then loop thru it and also check if the input id is 1-5, if it is then the message will show the star clicked. I included a link below for DOM manipulation. I highly recommend it.

DOM manipulation: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Manipulating_documents

Your CSS looks good. I would avoid using fixed width. For responsive layout it is better to avoid it. https://www.w3schools.com/html/html_responsive.asp is a good starting point

I hope this helps. Cheers to a good challenge completed.

Marked as helpful

0

@AdanSaavedra

Posted

@Nghuynh07 Thanks Huynh for your feedback and time, these resources will be so helpful for me, thanks for that. now I need to read and study those topics, I hope see you again here, giving me helpful feedbacks.😁

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord