Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Challenge - Daniel Simionescu #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

danielsimionescu07
Copy link

Implementation

Features

  • responsive cards

WZlF5oOVak

  • loading spinner
  • placeholder image
  • Snackbar for http errors

Used @ngrx/store and @ngrx/router-store:

  • I wanted to have a centralized application's state;
  • it makes it easier to manage and maintain in the long run;
  • easily access the current route and its parameters from any part of the application and react on it's change;
  • it separates the domain logic from the ui components, resulting in cleaner, more maintainable code;

Used @angular/material for showing errors with the help of the Snackbar.

Testing

Used @hirez_io/observer-spy and jasmine-auto-spies

  • makes it easier to test observables by providing a straightforward way to subscribe to them and inspect emitted values;
  • it simplifies the process of validating observable behaviors in tests;

For the last row edge case:

  • I implemented a solution that dynamically calculates the number of cards in the last row and adds empty placeholder cards as needed;
  • placeholder cards ensures that the flexbox calculation distributes space evenly, preserving the intended design;
  • flexbox layout retains the correct proportions, even when the number of items in the last row is fewer than the number of columns;

40DBDFpbJr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant