UCDavisLibrary / ucdlib-wp-plugins

Optional plugins for the UCD Wordpress Theme
0 stars 0 forks source link

Interactive Floor Maps #154

Closed wrenaria closed 1 year ago

wrenaria commented 1 year ago

The current Shields floor map display on the library website is simple images in an accordion. This feature request is to make floor maps more interactive, allowing users to click on the floor and toggle on/off different areas on the map. Blaisdell doesn't have levels, but it does have study zones, so the color coding toggles may prove useful for them too.

Related Files

Note: Dev features are enabled in the XD mock-up to easily check basic things like colors, just hit the </> button on the upper right side -- but if you have any questions, feel free to slack me.

User-facing Interface

New Features:

Desktop Mobile
Locations - Web 1427x802 – Shields Floor Maps – L Locations - Mobile 360x640 – Shields Floor Maps – L

Map Admin Controls

The image files for the floor maps will be managed by a graphic designer (Tim and/or me), so a user-friendly UI is desired for the WP dashboard in order to remove the need for developer touch whenever the map requires updates.

Features that may require editing capabilities include:

There are (up to) 2 layers in the UI that will be static / not toggled by switches:

All of the toggly layers will appear between these two images.

spelkey-ucd commented 1 year ago

@wrenaria Here is the first working implementation of this feature using the lower level image drafts you provided: https://sandbox.library.ucdavis.edu/test-map/. I think it's pretty close, though I am sure it will need some tweaks.

For the WP dashboard side, there are 8 new blocks, though only one (Interactive Building Map) can be inserted into a page. The rest are children and only accessible by this block.

image

Space Legend, Map Legend, and Floors are locked into place, and correspond to the three major components of the design. The remaining four blocks can be added/removed/reordered using the standard WP controls.

Let me know if you have questions, or want me to walk you through the editing process.

wrenaria commented 1 year ago

This is super great!

I threw together a few more floor map images (floors 1 and 3) to do more thorough testing. There are a few adjustments to make:

Editor-related Adjustments

icon Icon Name Legend Item
bottle Drinking Fountain
suitcase-secure Lockers
restroom-all All-Gender Restroom
restroom-men Men's Restroom
restroom-women Women's Restroom

User-facing UI Style Adjustments

PS - Nice breadcrumbs.

spelkey-ucd commented 1 year ago

An option top set a default floor for page load -- Floor 1 should be our default on load since it's where the main entrance is.

There is now a toggle switch on each floor: image

Each floor has a slightly different base shape, so one file for that won't work, there would need to be a dedicated base layer per floor. I am becoming inclined to just drop base color layer entirely and let the base color be the site color (white) to simplify map layer management though, so it's fine to just remove this feature.

Feature removed.

Add Pinot #76236C to the available color options.

I set up some hooks on the theme, so that now the block's colors can be controlled in Appearance->Customize->Colors->Floor Map Space Legend Item along with the theme blocks:

image

I added pinot on sandbox.

Add these custom SVG icons to the library website icon set (Tim uses them in his map legend):

image

Done. Just let me know if there are anymore.

Can the Floor Level buttons shrink enough to fit all floors on one line at mobile sizes? At least down to 360px viewports, 320px preferred. Even at smallest 320px phone size, they should still be within acceptable button hit area size as a single row and we're never going to have another library space with more than 4 floors.

Added some custom breakpoints, and now it doesnt break to two lines until 318px for me.

image

The gold separator line doesn't currently match the others we use on the site (see past exhibits, study spaces )

It's now dotted not dashed. sorry about that.

wrenaria commented 1 year ago

Looks fab and I haven't found any further issues to fix. I made another test page just to test the more simple options Blaisdell will have and it looks great too. Thanks Steve!

spelkey-ucd commented 1 year ago

@wrenaria

FYI, when exporting and uploading layers, watch out for the file size. One of the first floor layers was a whopping 10458X14468px, which was causing the page to crash on less powerful devices (my iphone).

image

I would have thought that it would have caused the page to just run slowly as opposed to outright crash, so I have to look into why...

wrenaria commented 1 year ago

Oh that is super weird, I really don't know how that happened? I have specific web sizes set on my exporter and the original artboard size for the file isn't even that big to begin with. Looks like everything else exported normally except for that layer. Sorry about that! I'll pay closer attention to checking my exported files in the future and also make sure to define specific size requirements for Tim, who will primarily be managing the image files.

spelkey-ucd commented 1 year ago

Deployed ucdlib-wp-plugins v3.5.0