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

Add current page highlighting on the pagination #32

Conversation

sikatikenmogne
Copy link
Contributor

Add current page highlighting on the pagination

This commit is linked to the issues #24 about the current pages highlighting on miniyotas.osscameroon.com

Preview

2024-08-18 15-02-52

Changes

Pagination Component

  • Added a Handlebars helper function to conditionally add a CSS class for the current page.
  • Updated the pagination component to use the new helper function.

Environment Variable Handling

  • Installed cross-env as a dev dependency.
  • Modified the dev script in package.json to use cross-env for setting environment variables.

How to Test

  1. Pagination Component:

    • Navigate through the pagination component and verify that the current page is highlighted correctly.
  2. Environment Variable Handling:

    • Run yarn dev on both Windows and Unix-based systems to ensure that the environment variable GOOGLE_ANALYTICS_ID is set correctly and the application starts without errors.

Related Issues

Additional Notes

  • Please ensure to run yarn install to install the new dev dependency cross-env.
  • You can also verify that the changes about the environment variable handling do not introduce any new issues or regressions or if its does, you can just revert this commit

…ing cross-env

This commit is about to resolve an error that i have encoutered after running `yarn dev` on Windows:

```
yarn dev
yarn run v1.22.22
$ GOOGLE_ANALYTICS_ID= nodemon ./src/index.ts
'GOOGLE_ANALYTICS_ID' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```

by using cross-env added as a dev dependency on the package.json on the `scripts.dev` statement
…g navigation

- add Handlebars helper function for conditional class addition
- ensure the current page is visually distinct in the pagination component
@pythonbrad
Copy link
Member

pythonbrad commented Aug 18, 2024

@sikatikenmogne, thanks for your contribution 👍🏿

It's good to have one pr per fix.
Please, Could you put the change related to the cross-env dependency in another pr?

I mean split this pr in two

@sikatikenmogne
Copy link
Contributor Author

@sikatikenmogne, thanks for your contribution 👍🏿

It's good to have one pr per fix. Please, Could you put the change related to the cross-env dependency in another pr?

I mean split this pr in two

Okay @pythonbrad, thank you for your quick response. According to your recommendation I've split this PR into two separate Pull Request (#33 and #34) following theses steps:

1. For the current page highlighting:

  1. Create a new branch based on 8f757d4

    git checkout -b feature/pagination-highlighting 8f757d4
  2. Revert the changes made in 8f757d4

    git reset --hard HEAD~1
  3. Cherry-Pick the Commit 7c63a611

    git cherry-pick 7c63a611
  4. publish the branch feature/pagination-highlighting and open a new pull request avaialable on Add current page highlighting on the pagination component #34

    git push origin feature/pagination-highlighting

2. For the .env loading error fix:

  1. Create a new branch based on 8f757d4

    git checkout -b fix/env-loading-error 8f757d4
  2. publish the new branch feature/pagination-highlighting and open a new pull request available on fix: resolve .env environment variable loading error on Windows #33

    git push origin fix/env-loading-error

@pythonbrad
Copy link
Member

Ok, remaining the review of the code owner.

@rakici
Copy link
Contributor

rakici commented Aug 22, 2024

@sikatikenmogne thanks for your contributions, I merged #34 and closes this PR as it is a duplicate.

@rakici rakici closed this Aug 22, 2024
@sikatikenmogne sikatikenmogne deleted the feat/add-highlightning-on-pagination branch August 22, 2024 12:40
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.

The current page is not highlighted
3 participants