Skip to content

v2.12.0-rc.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@bglamadrid bglamadrid released this 02 May 23:21
· 31 commits to main since this release

For this release candidate I put an emphasis on improving unit tests. After some painful realizations on how much I've learned about Angular and how many mistakes I made, many changes to the codebase itself were made during test development, not only for the betterment of functionality and test codebase themselves, but to reinforce the principle of division of concerns (which is a cornerstone in Angular, let alone all modern web frameworks).

So current coverage percentages are as follows:

  • Statements - 92.34% | 1930/2090
  • Branches - 81.25% | 702/864
  • Functions - 87.7% | 763/870
  • Lines - 92.11% | 1800/1954

Which is higher than the 80% overall percentage I originally aimed for.

However, this also may be the last version to support 1.x versions of the Trébol API, as I'm currently re-design it to implement the JSON: API Specification for better future-proofing.

Which means the real next version here (not a release candidate) will probably be major i.e. v3.0.

Added

  • Environment variables
    • Interval in miliseconds to check for current token validity
    • Default product image URL
  • Experimental startup loading spinner

Changed

  • AppService is replaced by three smaller, more specialized services
    • SessionService - knows (but does not tell) where to save session tokens; knows whether the user has an active one; and allows to fetch (and cache) authorization details
    • AuthenticationService - allows to login as user (or guest) and register, and to cancel any ongoing instance of these processes
    • ProfileService - allows to fetch (and cache) the current user's profile data, and to update it as well
  • ManagementHeaderComponent refactored down to simpler components
    • Introduced a common HeaderBrandComponent used in both store and management pages
  • Reorganized most form components into accordingly named forms/ directories
  • Frontpage lists show a paginator only when they have more than one page
  • Make better use of some shared components to display details of carts/sales
    • StoreCartContentsTable superseded by SellDetailsTable
  • In the sales management page, a new button triggers the dialog where clerks may view its details
  • Checkout-related components (in the store module) split & rewritten against model classes using self-evident nomenclature
    • StoreCheckoutRequestFormComponent has a form that accepts instances of CheckoutRequest
    • StoreBillingDetails has a form that accepts instances of BillingDetails
    • And so forth
  • Among other minor changes and refactors

Fixed

  • (UI) User name and details would not always be correct or up-to-date
    • (Performance) Make better use of existing auth HTTP APIs
  • (UI) Contents of cart would be editable after confirmation
  • (UX) After registration (and automatic login), the user would not retain profile info (namely their username)
  • (UI) Readjusted spacing of product cards in frontpage catalog
  • (UI) Set defined height for registration and guest login dialogs (for better use in mobile devices, where usually a virtual keyboard blocks the view)
  • (UX) Allow mobile devices to "tab" correctly in nested forms (when pressing 'Next')
  • (UX) Fetching initial sales data into the management page
  • (UX) Keep auth status up-to-date and centralized, without calling the API from multiple sources
  • Using actual instances of InjectionToken<T> to provide external API services
  • And several minor bugfixes

Removed

  • Unused components related to file upload (which may be included if the feature ever gets to the external API specification)
  • Sales data cannot be edited from the management module, as the SellFormComponent is no longer included
    • This may be reverted in future versions