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

support for prefers-color-scheme #1008

Merged
merged 7 commits into from Jan 2, 2023

Conversation

peterbecich
Copy link
Member

@peterbecich peterbecich commented Feb 13, 2022

Closes #1007
https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme

Some of the foreground and background colors are simply swapped. href colors should probably be brightened. Opinions appreciated. Preview: #1008 (comment)

@peterbecich peterbecich force-pushed the prefers-color-scheme-support branch 3 times, most recently from f8c28b9 to 16f1669 Compare May 26, 2022 03:51
@peterbecich peterbecich force-pushed the prefers-color-scheme-support branch from 16f1669 to f5a17d2 Compare May 26, 2022 03:57
@peterbecich
Copy link
Member Author

peterbecich commented May 26, 2022

Feedback appreciated

I think the default mode is unchanged.

Viewing in Firefox:
Screenshot 2022-05-25 at 21-04-49 Introduction Hackage
Screenshot 2022-05-25 at 21-04-20 Browse and search packages Hackage

How do I populate the module documentation / function definitions?
Edit: question here https://discourse.haskell.org/t/populate-module-documentation-in-local-instance-of-hackage-server/4630
i.e.

TwoCaptcha

    TwoCaptcha.Captcha
    Internal
        TwoCaptcha.Internal.Client
        Types
 ...          

I should check the function definitions look okay.

Screenshot 2022-05-25 at 21-04-35 2captcha

@peterbecich peterbecich marked this pull request as ready for review May 26, 2022 04:10
@peterbecich peterbecich changed the title work-in-progress support for prefers-color-scheme support for prefers-color-scheme May 26, 2022
@peterbecich
Copy link
Member Author

peterbecich commented May 26, 2022

Here is the Paginator
Screenshot 2022-05-25 at 23-17-06 Browse and search packages Hackage
Screenshot 2022-05-25 at 23-06-13 Browse and search packages Hackage

@peterbecich peterbecich force-pushed the prefers-color-scheme-support branch from c43dfcd to ec28b4e Compare May 26, 2022 06:17
@andreasabel
Copy link
Member

I like the colors and everything is clearly readable.

@peterbecich
Copy link
Member Author

peterbecich commented May 28, 2022

One thing I've not checked are any function definitions like:
Screenshot 2022-05-28 at 00-25-54 Data Vector Generic

because on my local instance of Hackage Server these are unpopulated:
func_definitions

Can you tell me how to populate these?

@peterbecich
Copy link
Member Author

Looks like there is more to do

The Haddock exists now
Screenshot 2022-06-03 at 00-02-43 zlib

It must use a different set of style sheets
Screenshot 2022-06-03 at 00-02-31 Codec Compression GZip

@gbaz gbaz merged commit 5f5b814 into haskell:master Jan 2, 2023
gbaz added a commit that referenced this pull request Jan 5, 2023
* delete unused GitHub Action; fix CI badge

* Fix #1076: separate validators from UI and doctest them (#1077)

* Cachix caching for nix-shell GitHub Action (#1081)

* Add uploaded_at field in package api (#1080)

* package page: Include virtual-modules in module tree (#1085)

* Allow hashable-1.4 and text-2.0 (#1089)

* Divide sitemap into parts

* Add sitemap link for subdirectories

* Fix `non-canonical-return` warnings

* Bump CI to GHC 9.2.3 and restrict to master branch

* Check authorisation (#1111)

* Dynamically add css piece

* Fix #1105: change order of markdown parsers to allow pipes in lists

* Fix #1128, fix #1130 by adding bounds to Cabal-syntax and haddock-library

* Bump CI to 9.2.4 and some deps

* Force .txt and .text to have UTF-8 MIME charset (#1133)

* Upgrade to haddock-library-1.11.0 (#1126)

* attempt to speed up GitHub Action for Nix Shell

* work with cabal 3.8

* Updated accepted licenses (#1092)

* Add dependabot for github workflows

* Bump cachix/cachix-action from 10 to 12

* Bump actions/checkout from 2.4.0 to 3.1.0
* Bump cachix/install-nix-action from 17 to 18

* Build with Cabal-3.8 and GHC 9.4 (#1141)

* Haskell CI: bump to Ubuntu-22.04, GHC 9.2.5 and 9.4.4

* Allow mtl-2.3 and transformers-0.6 (#1150)

* Disable test (#1124)

* allow disable tests on client side

* add deprecated version warning (#1123)

* List maintainers on package page (#1098)

* List maintainers on package page

* Vendor snowball package (#1116)

* Add searchbox metadata (#1115)

* Add captcha for user registration (#1099)

* remove filtering 00-index for cabal version < 2.0 hack (#1152)

* Add lastVersion in listings (#749) (#1140)

* rm icu dep instructions, add libgd

* Add test log display (#1100)

* Add test log

* Reverse Dependencies indexed on PackageName (#1082)

* Rebased Reverse Dependencies

* Add "Quick Jump" to candidate package page (#1122)

* Solves #1029 - Adds paging to recent packages and recent revisions (#1055)

* support for `prefers-color-scheme` (#1008)

* 2x brightness for captions and links in dark color scheme

* table dark color scheme

* prefers-color-scheme for links, footer, and table-of-contents

* paginator css for `prefers-color-scheme`

* Maintainer notifications

* cleanup partial functions for revdeps, elim use of MonadThrow, MonadCatch

* fix tests enablement link

Co-authored-by: Peter Becich <peterbecich@gmail.com>
Co-authored-by: Andreas Abel <andreas.abel@ifi.lmu.de>
Co-authored-by: Hécate Moonlight <Kleidukos@users.noreply.github.com>
Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: ˌbodʲɪˈɡrʲim <andrew.lelechenko@gmail.com>
Co-authored-by: Alias Qli <2576814881@qq.com>
Co-authored-by: Ondřej Kubánek <71923533+kubaneko@users.noreply.github.com>
Co-authored-by: Gautier DI FOLCO <gautier.difolco@gmail.com>
Co-authored-by: Janus Troelsen <ysangkok@gmail.com>
Co-authored-by: Levi Butcher <31522433+LeviButcher@users.noreply.github.com>
@gbaz
Copy link
Contributor

gbaz commented Jan 6, 2023

For the most part people seem really happy about this!

However, a comment points out a few missed spots -- quickjump, and also the (new) revdeps feature. A pr to fix these up would be most welcome. https://discourse.haskell.org/t/new-hackage-server-features/2621/28

@gbaz
Copy link
Contributor

gbaz commented Jan 6, 2023

oh some of the banners too https://twitter.com/qnikst/status/1611392984700055552

@peterbecich
Copy link
Member Author

Whoops, I'll prioritize an opt-in button, will try to get this done today

@gbaz
Copy link
Contributor

gbaz commented Jan 7, 2023

In my opinion, an opt-out is not so important, compared to just fixing up the maybe three cases discovered so far that need to be handled. Luckily as this is just a CSS change, deploying it will be safe and simple.

@peterbecich
Copy link
Member Author

Okay, will do

@peterbecich
Copy link
Member Author

peterbecich commented Jan 7, 2023

please review #1162

I need to fix the Quick Jump separately, WIP: #1163

@peterbecich peterbecich deleted the prefers-color-scheme-support branch January 7, 2023 02:37
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.

Support CSS feature prefers-color-scheme
3 participants