Git Product home page Git Product logo

chrislb's Introduction

chrislb's People

Contributors

chris-04 avatar davidlj95 avatar dependabot[bot] avatar renovate[bot] avatar

Watchers

 avatar  avatar

chrislb's Issues

Add more unit tests

Just images swiper directive contains unit tests

Most of services are straight-forward enough so tests aren't actually needed. But we could add some to some that are more complex or are essential pieces for the app:

  • Project assets collections service
  • Project page component
  • JSON fetcher services
  • Projects service (get list items)

Include Lighthouse in dependency updating tool

Currently, the command to run Lighthouse is in the CI's Makefile. As an npx command. And Renovate (automated dependency update tool) doesn't read that to update it. We'll miss updates in there.

Some ideas

  • Install it as dev dependency
    • Though isn't needed for build, test, style, ... Seems not quite big as pkg: 96kB. But does it download some headless browser like Puppeteer too?
    • Helps running locally ๐Ÿ‘
  • Parsing this file to be interpreted by the dependency update tool

Replace @ngaox/seo library with something else

It's forcing use of --legacy-peer-deps given requires Angular v15 as peer dep. But app is using Angular v16 and soon will be v17. Which is a PIA. When using npm, bun doesn't care.

There's probably a more updated / popular dependency for metadata. We need:

  • Set the page title
  • Set the page description
  • Set Open Graph metadata
  • Set Twitter card metadata
  • Set extra metadata (keywords, author, ...)

When navigating back, scroll position is not restored

You always go back to the "Anatomies" project (second one at moment of writing this)

Noticed in #332 but already happened in Angular v16. In Angular v17, a warning started appearing in the console:

http-json-fetcher.service.ts:16 NG02952: The NgOptimizedImage directive (activated on an <img> element with the ngSrc="/projects/fresh-cut/design-book/6.jpg?updatedAt=1699455369751") has detected that the height of the fill-mode image is zero. This is likely because the containing element does not have the CSS 'position' property set to one of the following: "relative", "fixed", or "absolute". To fix this problem, make sure the container element has the CSS 'position' property defined and the height of the element is not zero.

Do not autoplay swiper if not in view

Autoplay is enabled on all swipers. Which is unnecessary (JS compute time) if swipers aren't on screen. Unfortunately, there's no option in Swiper.js to just enable autoplay when swiper is visible

We could add something with Intersection Observer API to enable this.

Indeed the autoplay functionality seems doesn't use best practices, because Lighthouse is not happy with it. So if autoplay is just enabled for the swiper on screen, we could pass the check. Check started failing when we created the project detail view, which was the first page to contain more then one image swiper (just one project existed at the beginning)

Improve responsive image breakpoints for project list items images swipers

Currently code indicates an image takes 33.3vw when on big screens (bigger than S breakpoint -> 960px). However, that's not entirely true given:

  • SCSS states swiper will take calc(100vw - 55ch). To allow text to take recommended size for lines to be readable. So images would take half of that. Which is almost 33.33vw. But not exactly that
  • SCSS states also that swiper won't exceed a certain height. So that the full image can be seen in screen. This is not taken into account when generating breakpoints for responsive images

So breakpoints are not exactly right. But good enough according to Lighthouse though ๐Ÿ‘

Add share buttons

So user can share the page with their contacts. And we can show off the metadata set in each page

Avoid images swiper layout shift

When the swiper hasn't inited yet, images have no size. Hence the swiper has no size either. This means that when properly initialised, you see a quick flash from the layout with swiper having no size to the proper layout with swiper initialised.

We could add some layout styling to minimise the layout shift between those two states

Sync SCSS with Typescript

Description

Some code is written both in SCSS and Typescript. Which could lead to changes in one not applied in the other and some things to not work as intended.

Items to sync

Animations

CSS ones are preferred, but some can't be done with just CSS. So Angular animations are coded in Typescript.

Impact if out of sync

Animations timings and easing functions need to be in sync for a harmonic user experience

Detection

Currently, nothing is set to detect if they get out of sync

Layout breakpoints

Some CSS layouts depend on breakpoints. Also, responsive images depend on those for proper responsive image breakpoints generation. They need to be in sync with layout, hence with those layout breakpoints so that proper responsive image breakpoints can be generated.

Impact if out of sync

Responsive image breakpoints won't be generated according to image sizes

Detection

Fortunately, Lighthouse would detect issues when breakpoints aren't right enough

Responsive images size

They're coded in CSS styles (in vw mainly). But those values are also needed in component code to generate responsive image breakpoints accordingly.

Impact if out of sync

Responsive image breakpoints won't be generated according to image sizes

Detection

Fortunately, Lighthouse would detect issues when breakpoints aren't right enough

Ideas

  • Try moving everything to component code. Which is prerendered, so would end up as static inline CSS anyway. Doesn't apply for animations though
  • SCSS to JSON. Or something like that. To export variables from SCSS for reuse inside the app components code.

Improve image lists generation performance

Currently, image lists queries are run one by one, not in parallel. This is to avoid triggering ImageKit.io rate limits.

If rate limit was reached, script would raise an error and stop. To properly handle that, some code should be added to wait the specified time until trying again. More info in docs mentioned above

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • build(deps): update angular monorepo to v17.3.4 (@angular/animations, @angular/common, @angular/compiler, @angular/compiler-cli, @angular/core, @angular/forms, @angular/platform-browser, @angular/platform-browser-dynamic, @angular/platform-server, @angular/router)
  • build(deps-dev): update angular-cli monorepo to v17.3.4 (@angular-devkit/build-angular, @angular/cli, @angular/ssr)
  • build(deps-dev): update dependency ng-mocks to v14.12.2
  • build(deps-dev): update pnpm to v8.15.7
  • build(deps-dev): update dependency @lhci/cli to v0.13.0
  • build(deps-dev): update dependency eslint to v9

Detected dependencies

github-actions
.github/actions/deploy-preview-status/action.yml
  • actions/github-script v7@60a0d83039c74a4aee543508d2ffcb1c3799cdea
.github/actions/setup/action.yml
  • actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
.github/workflows/reusable-build.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/cache v4@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
  • actions/upload-artifact v4@5d5d22a31266ced268874388b861e4b58bb5c2f3
.github/workflows/reusable-deploy-cloudflare-pages.yml
  • actions/download-artifact v4@c850b930e6ba138125429b7e5c93fc707a7f8427
  • actions/github-script v7@60a0d83039c74a4aee543508d2ffcb1c3799cdea
  • cloudflare/pages-action 1@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
.github/workflows/reusable-deploy-github-pages.yml
  • actions/download-artifact v4@c850b930e6ba138125429b7e5c93fc707a7f8427
  • actions/configure-pages v5@983d7736d9b0ae728b81ab479565c72886d7745b
  • actions/upload-pages-artifact v3@56afc609e74202658d3ffba0e8f6dda462b719fa
  • actions/deploy-pages v4@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e
.github/workflows/reusable-lint.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
.github/workflows/reusable-performance.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
  • actions/download-artifact v4@c850b930e6ba138125429b7e5c93fc707a7f8427
.github/workflows/reusable-style.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
.github/workflows/reusable-test.yml
  • actions/checkout v4@b4ffde65f46336ab88eb53be808477a3936bae11
nodenv
.node-version
  • node 20.12.2
npm
package.json
  • @angular/animations 17.3.3
  • @angular/common 17.3.3
  • @angular/compiler 17.3.3
  • @angular/core 17.3.3
  • @angular/forms 17.3.3
  • @angular/platform-browser 17.3.3
  • @angular/platform-browser-dynamic 17.3.3
  • @angular/platform-server 17.3.3
  • @angular/router 17.3.3
  • @angular/ssr 17.3.3
  • @davidlj95/ngx-meta 1.0.0-beta.2
  • @fontsource/fira-sans 5.0.19
  • @fortawesome/angular-fontawesome 0.14.1
  • @fortawesome/fontawesome-svg-core 6.5.2
  • @fortawesome/free-brands-svg-icons 6.5.2
  • @fortawesome/free-solid-svg-icons 6.5.2
  • @types/lodash-es 4.17.12
  • @unpic/core 0.0.47
  • compression 1.7.4
  • express 4.19.2
  • gardevoir 1.0.0
  • lodash-es 4.17.21
  • rxjs 7.8.1
  • swiper 11.1.1
  • tslib 2.6.2
  • zone.js 0.14.4
  • @angular-devkit/build-angular 17.3.3
  • @angular-eslint/builder 17.3.0
  • @angular-eslint/eslint-plugin 17.3.0
  • @angular-eslint/eslint-plugin-template 17.3.0
  • @angular-eslint/schematics 17.3.0
  • @angular-eslint/template-parser 17.3.0
  • @angular/cli 17.3.3
  • @angular/compiler-cli 17.3.3
  • @lhci/cli 0.12.0
  • @types/compression 1.7.5
  • @types/express 4.17.21
  • @types/jasmine 5.1.4
  • @types/node 20.12.7
  • @typescript-eslint/eslint-plugin 7.6.0
  • @typescript-eslint/parser 7.6.0
  • browser-sync 3.0.2
  • dotenv 16.4.5
  • eslint 8.57.0
  • eslint-config-prettier 9.1.0
  • husky 9.0.11
  • imagekit 5.0.1
  • jasmine-core 5.1.2
  • karma 6.4.3
  • karma-chrome-launcher 3.2.0
  • karma-coverage 2.2.1
  • karma-jasmine 5.1.0
  • karma-jasmine-html-reporter 2.1.0
  • lint-staged 15.2.2
  • ng-mocks 14.12.1
  • prettier 3.2.5
  • tsm 2.3.0
  • typescript 5.4.5
  • pnpm 8.15.6

  • Check this box to trigger a request for Renovate to run again on this repository

Users don't understand projects page is main page

They say they think the "projects" navigation item doesn't work. Given when in the home page and clicking it, nothing happens.

Some solutions:

  • Do not add navigation link style for item if current page is shown

Memoization

There's some code in scripts that uses poor man's memoization:

if(!this._foo) {
 this._foo = expensiveComputation()
}
return this._foo

We could install a lib for that. Just to explore and discover. Not too many use cases to actually be an issue. Will probably look better in code though.

Users don't expect titles to be clickable

After testing with several users, most of them didn't click the title to inspect a project in the project list view.

Maybe adding a button or something "Show more" could help? Or changing link style

Watch for content changes

Could be nice to reload whenever some JSON content changes. For a better DX. Also, we could run contents generator whenever JSON content changes to ensure lists match latest content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.