Support for double driver chyrons.
Serious refactoring of the BroadcastGraphics states.
Simplification and improvements to how the chyron states work (I was using interfaces in a way that was incompatible with reality and have fixed it).
Have a lot of the scaffolding in place. Next step is to make the Chyron controls actually work.
Dramatic re-thinking of the chyron state definitions.
Lots of goofy type following tricks in broadcastGraphics.ts.
As well as just being a little bit better this was necessary to support specifically typed values. We were always going to be selecting between strictly strings. This should allow us to be more flexible.
Also, to avoid a minor bug with switching the Overlay tool with it being invisible SlotSelector now supports being disabled.
Have a work-in-progress AngledFlag prototype controller that relying on a central state property in the Workspaces portion of the store. It's a bit hacky. But it made me realize that my desire to do silly things with extending interfaces won't work that way I'm going to need to rely on them in the future. I cannot demand more specific data from a state that uses a less specific interface. Rookie mistake.
I am also at the mercy of a design flaw when it comes to using React Hooks: The way I organize Workspaces makes React very angry. When I switch between workspaces that rely on hooks to render correctly the whole thing explodes.
I believe I need to use components directly to correctly unmount - instead of the very hacky switch statement I have in the form of fetchBroadcastGraphic().
I might need to try seeing if ReactRouter can provide my solution.
Updated the use of "National" to "Country" and renamed some directories.
Added a second larger AngledFlag to the Workspace (because changes that affect the larger size might be hidden by a smaller flag).
Added missing flag for Poland (both original and 2:1 "angled" style).
Added correct 2:1 flags for Mexico and Monaco.
More overlay images (to help with driver number coloring).
It's not 100% complete - I still need to add the second, slightly offset sub flag that goes beneath the main flag, creating a sort of refractive-glass/parallax effect.
Needed to add a new workspace. Thankfully it's pretty easy to add a new workspace. So, kinda nice.
Did a lot of work making 2:1 versions of each flag in vector. Was a bit of a pain in the ass.
Renamed a prop for ProgressSlider, "onBarColor" because prefixing a prop with "on" is special for React and it gets upset and spits out an error.
Added a great new feature: an active outline styling rule. When dragging the overlay image around there's now a red outline to help match edges that are otherwise black-on-black; making them very difficult to align.
A lot of work going on here.
* Moved WorkspaceControls component to a new sub directory
* Renamed overlay images
* Started a static ChyronDriverBasic component (using Hamilton as an example)
* Created a fancy DriverNumber rendering system
* Defined DriverNumber style for Mercedes and no one else yet
* A bunch of new states for the grid: cars, drivers, teams, etc
* Defined a bunch of data for the drivers and teams
* Created another string utility function to generate repeat strings; unit tests included
Okay. I'm content with what I've made. It's not really up to the level of "oh man, package this up as a library and put it out on NPM!" but it works OK for my specific situation.
I ran into too many issues with the percentage value being buggy when the overlay wasn't visible.
I'm still running into issues where useMeasure isn't populating fast enough and the left prop isn't being set correctly.
I'm sure, if I really wanted to, I could find a two step process of loading at 0 opacity, finding the dimensions, and then moving it to the center and revealing it. But I don't have the desire.
Still. I went ahead and added workspace properties to the central state and read from them when it makes sense.
Shout-out to Blair Wadman for revealing a method to display an image at 1:1 pixel scale and having the div that houses it automatically match that size without any fuss. (Here: https://befused.com/css/flexbox-prevent-image-shrinking/).
Total change to workspaces. Now an object instead of a list.
Utilizing workspace overlays list - prototype currently colors the mock item.
Reset overlay on workspace change.
Improved combined dragging/transition element behavior.
The secret? Don't! Use another throw-away div and put it around the draggable div.
Also adopted animated.div into the Styled-Component. Really cool how it just works.
* Moved FullScreenContainer in WorkspacesRoute to make scrolling much better. Seriously, 100% works better.
* Simplified dimensions state actions to a shared one.
* Abandoned the noisy and useless "AnimatedBG" type.
* Added workspace dimensions state (I'll need this later to prevent off-screen dragging).
* Placed OverlayDisplay component in PreviewWindow, where it makes more sense. I'll still allow it to roam around outside of it, though.
* Renamed "menu" dimensions to "mainMenu".
* Improved initNewOverlayItem action to support setting visible.
* Correct handling of showing the OverlayItemContainer.
* Simplified the initial position of a new OverlayItem to a simple initial value instead of setting it in the middle of provided dimensions.
* Made PreviewWindow `position: relative` to allow absolute positioning of OverlayItem from it.
* Added importHelpers to tsconfig because VSCode was complaining about it.