Commit graph

32 commits

Author SHA1 Message Date
Marco Daniel Martins 0d663f27fa
Accessibility fixes (#651)
* frontend: fix critical accessibility issues, logo alt and language

* frontend: use buttons for pagination, override bootstrap for accessibility

* frontend: heading elements in sequential order

* frontend: override badge contrast ratio

* frontend: fix import

* frontend: fixup

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-04-27 21:43:27 +02:00
Marco Daniel Martins 1ecb696edd
Improve search results with underscore and dash/hyphen package names (#649)
* Create underscore & dash separated variants for wildcard search

* frontend: simplify list uniqueness

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-04-25 17:07:49 +02:00
Aroun 95f0433225
Follow title convention for package requests (#639) 2023-03-30 00:48:37 +02:00
github-actions[bot] af6a59015c
flake.lock: Update (#606)
* flake.lock: Update

Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
  → 'github:numtide/flake-utils/93a2b84fc4b70d9e089d029deacc3583435c2ed6' (2023-03-15)
• Updated input 'nixos-org-configurations':
    'github:NixOS/nixos-org-configurations/3ce43a1fb5181a0e33b1f67d36fa0f3affa6bc6c' (2023-01-24)
  → 'github:NixOS/nixos-org-configurations/48c9b1cff22edd2a7342eb0ff7034dcad3d99e38' (2023-03-16)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c07552f6f7d4eead7806645ec03f7f1eb71ba6bd' (2023-01-10)
  → 'github:NixOS/nixpkgs/ac718d02867a84b42522a0ece52d841188208f2c' (2023-03-15)
• Updated input 'npmlock2nix':
    'github:nix-community/npmlock2nix/eeed152290ec2425f96c5e74e469c40b621e1468' (2022-10-22)
  → 'github:nix-community/npmlock2nix/9197bbf397d76059a76310523d45df10d2e4ca81' (2023-01-11)

* use v1 api

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rok Garbas <rok@floxdev.com>
2023-03-27 09:01:04 +02:00
Valentin Gagarin 3a42ce9545
move programs to the top of the metadata display (#620)
* move programs to the top of the metadata display

rename to "programs provided", since where they are provided
is an implementation detail irrelevant to users of `nix-shell -p`.

* Fix CSS

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-16 10:18:09 +01:00
Valentin Gagarin ad5fab6ce5
refine the warning on using nix-env (#619)
* refine the warning on using `nix-env`

also highlight the command name

* Format

---------

Co-authored-by: Naïm Favier <n@monade.li>
2023-02-16 10:00:06 +01:00
Naïm Favier dff4ba7132
Search programs provided by a package (#610)
* Search programs provided by a package

Use the `programs.sqlite` database provided with nixpkgs channels to
populate a `package_programs` field so that searches for e.g. `make` return
`gnumake` with a higher priority.

* Bump VERSION

* frontend: show programs
2023-02-07 16:31:17 +01:00
Massolari 95b7e40c55
Rename "Options" link to "NixOS Options" (#596)
Co-authored-by: Naïm Favier <n@monade.li>
Fixes https://github.com/NixOS/nixos-search/issues/426
2023-01-27 18:58:25 +01:00
Naïm Favier a7ac1d8e8c
frontend: reset from and buckets when changing pages (#595)
Co-authored-by: Rok Garbas <rok@garbas.si>
2023-01-27 18:49:55 +01:00
sem pruijs 1d9fac3a57
Improve accessibility for screenreader users (#593)
Co-authored-by: Naïm Favier <n@monade.li>
2023-01-06 16:43:26 +01:00
Naïm Favier d04f341a5d
Use path_hierarchy tokenizer for attr paths (#584) 2022-12-23 13:39:45 +01:00
Naïm Favier 4bea45b150
Remove reverse fields (#579) 2022-12-06 23:58:51 +01:00
Naïm Favier 9a20bad5e1
Make wildcard search case-insensitive (#559)
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html#wildcard-query-field-params
2022-11-04 13:27:13 +01:00
Naïm Favier cf23c13a17
Make search query default to show if given (#561)
This allows for shorter permalinks for displaying a given package.
2022-11-04 13:22:52 +01:00
Naïm Favier 5bbe885b62
Do not restore from and size from the previous model (#562) 2022-11-04 12:06:19 +01:00
Rok Garbas 515d60601b
Fix netlify problem introduces in #532 (#557) 2022-11-03 23:44:19 +01:00
github-actions[bot] 84ce7fdf52
Update npm dependencies (also flake.lock: Update) (#532)
* flake.lock: Update

Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/c0e246b9b83f637f4681389ecabcb2681b4f3af0' (2022-08-07)
  → 'github:numtide/flake-utils/6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817' (2022-10-29)
• Updated input 'nixos-org-configurations':
    'github:NixOS/nixos-org-configurations/569797100aac69780a12542c2143bb741380d4ec' (2022-08-17)
  → 'github:NixOS/nixos-org-configurations/cebfd15c30724cadacf85b5fd950dc1070c4eb7d' (2022-10-26)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f3d0897be466aa09a37f6bf59e62c360c3f9a6cc' (2022-08-25)
  → 'github:NixOS/nixpkgs/448a599c49978c2794401bfc3a2e1fba1a8663be' (2022-10-28)

* Switch from yarn to npm for frontend

also update all the npm dependencies

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rok Garbas <rok@garbas.si>
2022-11-03 22:26:58 +01:00
Rok Garbas 4bc2ea9d05
Switch to new cluster with elasticsearch 7.10 (#556) 2022-11-03 10:56:05 +01:00
Naïm Favier 474dbedd9b
Make wildcard search respect case (#538) 2022-11-02 15:21:49 +01:00
Naïm Favier ba0b05b998
Render Markdown in option docs for flakes and longDescription (#539) 2022-10-28 15:49:15 +02:00
MatthewCroughan a76f3f779c
Show nix-shell instructions first instead of NixOS Configuration (#526) 2022-08-29 13:23:49 +02:00
Naïm Favier d94c60ca12
frontend: remove trailing whitespace in installation instructions (#522) 2022-08-25 18:33:15 +02:00
Philip Munksgaard 9e5f095369
Add support for sourcehut links (#517)
* Add support for SourceHut flakes

* Update flake-info/README.md

Co-authored-by: Naïm Favier <n@monade.li>

Co-authored-by: Naïm Favier <n@monade.li>
2022-08-23 14:42:06 +02:00
MatthewCroughan f504a9fdd7
encourage NixOS configuration, nix-shell and discourage nix-env (#514)
Co-authored-by: Naïm Favier <n@monade.li>
2022-08-11 15:35:57 +02:00
Robert Hensing 1faac2eeb6
Remove Loading from title (#507)
It used to show up in discourse links, looking silly.

"Loading" didn't really add information. If it loads slowly or not
at all, the result will be quite obvious, and often the bit that
says "Loading" doesn't even fit in the browser tab label.
2022-08-02 22:09:34 +02:00
erikarvstedt 0453790a74
Flakes search: Include flake name (#499) 2022-07-28 15:11:00 +02:00
Naïm Camille Favier 7e0226d427
frontend: select package name on click (#497)
Fixes https://github.com/NixOS/nixos-search/issues/496
2022-07-04 12:59:23 +02:00
Naïm Camille Favier 74ed61a915
Display deprecated channels (#489) 2022-06-08 01:55:26 +02:00
Rok Garbas eea6cd3ffb
Feat/dynamic import (#473)
* Make the channel importer versions dynamic

* few things fromt he list

1. add nixos-org-configurations as input to flake.nix
2. evaluate channels.nix file and export channels via environment variable.
   that environment variable (lets call it NIXOS_CHANNELS) should be present
   during the build and inside the nix shell. the content of the variable can
   be JSON.
3. we pickup the NIXOS_CHANNELS environment variable in
   frontend/webpack.config.js and pass it further to webpack process, just
   like we do with ELASTICSEARCH_MAPPING_SCHEMA_VERSION.
4. we forward NIXOS_CHANNELS to Elm via frontend/src/index.js as an Elm
   application flag. Just like we do with other variables there.

* Decode nixosChannels in Elm

* Use nixosChannels that came via application flag

* read nixos channels in github action

* defaultNixOSChannel should be calculated

* add two pointers where the check should be added

* pass nixosChannels to flake-info and remove title, rather calculate it

* Add NixosChannels struct validation and validation Error

* Read NIXOS_CHANNEL variable

* Check channel

* Add channel struct to fix parsing NIXOS_CHANNELS

* Use `eachDefaultSystem` instead of listing them manually

* Add individual dev shells for frontend and backend

* Update .github/workflows/import-to-elasticsearch.yml

Co-authored-by: Naïm Favier <n@monade.li>

* use both development environments by default (as it was)

but still provide devShells for each of the subprojects

* pkgs.lib → lib everywhere

and define lib = nixpkgs.lib before the call to eachDefaultSystem
Also, version = lib.fileContents ./VERSION;

* Update flake.nix

Co-authored-by: Naïm Favier <n@monade.li>

* typo

* bumping version to test the changes to import-to-elasticsearch github action

* some invisibile characters needed to be removed

* typo

* will this work

* typo

* forgot the checkout step

* add some debugging

* typo

* read NIXOS_CHANNELS from environment not via argument

* fix for the NIXOS_CHANNELS variable

Co-authored-by: Janne Heß <janne@hess.ooo>
Co-authored-by: ysndr <me@ysndr.de>
Co-authored-by: Naïm Favier <n@monade.li>
2022-04-24 23:48:01 +02:00
Naïm Favier ff22728d9a
Fix display of null and missing defaults and examples (#457)
* flake-info: fix import of `null` defaults and examples

Currently they're being treated as missing fields, and hence displayed
as "Not given" on the frontend.

* Bump VERSION

* frontend/Options: don't show missing fields

Co-authored-by: Rok Garbas <rok@garbas.si>
2022-04-07 23:57:35 +02:00
Rok Garbas b389e378c2
Some frontend cleanup (#459)
* remove Debug.log statements

* move View.Components.SearchInput.viewBucket into Search module

* combine 2 version of viewSearchInput

* moving viewFlakes function to Search module

and removing View.Components.SearchInput module

* removing View.Components module

* use :: instead of List.append
2022-03-31 16:32:28 +02:00
Naïm Favier b316bc13cc
Workflow improvements (#458)
- Separate building flake-info into a new workflow that's triggered on push
  and on relevant pull requests
- Move frontend-related files into a `frontend` subdirectory
2022-03-30 20:45:35 +02:00