Would be great to see a port of this module.

Comments

mgifford created an issue. See original summary.

hkirsman’s picture

I'm interested in that too. It's just matter of time!

neograph734’s picture

Status: Active » Needs work

I took a stab at this in a sandbox https://www.drupal.org/sandbox/neograph734/2848033 (Check the Version control tab for git cloning instructions). It is nowhere near finished and some functions are still missing or broken, but this is as far as I could get in one day. Currently the block works with the select or radio widgets, injecting a fixed stylesheet.

If others are interested in developing I can grant access to the sandbox. If the module maintainers wants to clone the code to a branch of this module, it is fine with me as well.

hkirsman’s picture

Nice beginning!

Few questions.
1. What should I do after enabling the module and adding the block? For me, site didn't turn to high contrast when I clicked the button in the high contrast block.
2. /admin/config/user-interface/high-contrast is supposed to be empty at the moment?

neograph734’s picture

I moved most of the configuration from /admin/config/user-interface/high-contrast to the block configuration page. Allowing different form elements per block (you can have more than one on the page).
So /admin/config/user-interface/high-contrast is intended for changing high contrast logo and hopefully the css.

What should I do after enabling the module and adding the block? For me, site didn't turn to high contrast when I clicked the button in the high contrast block.

The first option 'links' is not yet working, so you should edit the block and choose radios or select. It should work after that.

neograph734’s picture

Status: Needs work » Needs review

I just pushed some more changes to the repository. All widget types (links, select and radios) appeared to be working now. There is an option to configure some of the colors used in the stylesheet (requires a cache clear for now).

Basically all that's left is the logo and come cleaning up.

Please tell me what you think!

hkirsman’s picture

Sorry for delay. Haven't yet had time to give a second look at it but I liked it already before :) I'll try review it later on today and hopefully merge it with this project if this is ok? If I do this I think it would be right to add you as co-maintainer, Neograph734! ok?

neograph734’s picture

No problem, I just wanted to make you aware of the additional changes. Feel free to merge the code, your project is a better place for it than my sandbox :)

I'd be happy to maintain it a little!

hkirsman’s picture

hkirsman’s picture

Sorry I didn't understand how to get the correct commit message that would give credit to you :(

neograph734’s picture

Status: Needs review » Fixed

No problem, I didn't do if for the credits ;)

Marking this issue as fixed.

markie’s picture

Can we get a release for this branch please? at least a dev?

neograph734’s picture

It is packing now, should show up soon. :)

hkirsman’s picture

In the D7 branch I used cookies and js to load the hight contrast css. This was because otherwise caching modules/software could cache the version that has high contrast css included in html. Next user that comes to the site, would then see the high contrast version. Something to add to todo list :)

neograph734’s picture

@hkirsman I guess it would be good to create a meta issue for all todo's and other issues. I have however spent quite some time to make the module work with Drupal's dynamic page cache. So out of the box it should already be compatible with regular cache. Do'n know about Varnish and other fancy caching solutions though.

hkirsman’s picture

Seems like a great start already if it works with Drupals dynamic page cache. I'll create an issue - may be there's nothing to fix but at least then it's checked at some point. Boost is not officially available for D8 but there's working version on github. Will check how it works with that.

hkirsman’s picture

Status: Fixed » Closed (fixed)
hkirsman’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev