Lattyware / massivedecks

A comedy party game for PC, mobile & chromecast.
http://md.rereadgames.com/
GNU Affero General Public License v3.0
437 stars 89 forks source link

Capitalize the first word in a black card #167

Closed TheChilliPL closed 4 years ago

TheChilliPL commented 4 years ago

If the black card starts with a space for a white card and it gets filled, it should get capitalized like on the white cards alone.

Lattyware commented 4 years ago

This depends on the deck in use. Decks specify what slots should be capitalised (or other things like being made ALL CAPS), so the deck should do so where it makes sense to.

So really to know what needs fixing here I'd need to know where the card was from (and ideally what the exact card was).

TheChilliPL commented 4 years ago

How to do that in a Many Decks deck?

Lattyware commented 4 years ago

If you click on a black card in the list of cards to edit it, it will show up:

image

If you then click the slot it will be highlighted (as shown) and you can then press the buttons up top to change the transform that will be applied to the slot. The first is capitalisation, the second is all caps.

I don't believe we do any automation of this with heuristics when importing. We should probably do so as importing a lot of cards would create a lot of these to manually change. I made an issue for that at Lattyware/manydecks#17.

TheChilliPL commented 4 years ago

Thanks, it works! I think there should be some easy way to see the capitalization in the editing screen—e.g. a semi-transparent text abc in the slot

Lattyware commented 4 years ago

Agreed, there is an existing task Lattyware/manydecks#12 for improving the call editor that should include that. I've never really been happy with it (the whole of Many Decks was made very quickly in response to Cardcast dying, there are a lot of papercuts still I'd like to fix when I find the time).

TheChilliPL commented 4 years ago

Good to hear. Also, I think importing is broken. Couldn't get it to work—the import button was disabled and even canceling was broken as after that, the toggle switch about deleting the deck appears like 20 times.

P.S. Thanks for the Massive Decks anyway—I wanted to play it with friends today and it (Cardcast) was dead so I searched for an alternative, I found your project and despite a few bugs, it's great!

Lattyware commented 4 years ago

Hrm. A quick test and importing appears to work fine for me. Not sure what happened there, but if you can reproduce it consistently, let me know your browser version and platform (windows, mac, linux, etc...) and I'll try and work out what is going on there.

And no problem, glad it works for you and your friends.

TheChilliPL commented 4 years ago

I mean the importing with a textbox. Importing a whole deck from a file does work. image The Submit button is grayed out, and after clicking on Cancel: image

Lattyware commented 4 years ago

Hrm, I can't reproduce that. As soon as something is typed the import button should stop being greyed out, and cancelling works fine.

The icon bottom right in the text field looks like it belongs to a browser plugin? There is a chance that plugin is breaking the page.

Elm uses a diffing mechanism which can break if the page is changed by something else, and when it breaks you can see things like the duplication of the deletion elements there, which you wouldn't really see any other way, so I suspect that might be what is going on.

If I am right about it being a plugin/extension, could you try with the extension disabled, and if that fixes it, let me know what the extension is so I can try to work out how to mitigate the bug it is causing?

TheChilliPL commented 4 years ago

image I have some problems—can't sign in with Google using incognito mode. After going through Google log in Window, nothing happens and the sign in with Google button stops working. Console is also empty

Lattyware commented 4 years ago

The Google thing is a known issue with sign in with google in general in that it fails to work if the user blocks 3rd party cookies (which Firefox does by default in Incognito mode, I believe—and is generally a good idea anyway). Cardcast actually had this same issue for me.

Not much we can do about this, but we should probably add a warning so people at least know why it is failing. There is an open issue related to this at Lattyware/manydecks#16.

TheChilliPL commented 4 years ago

Uhh, it seems the site doesn't work on Edge at all image

TheChilliPL commented 4 years ago

(only the background is visible)

TheChilliPL commented 4 years ago

The importing seems to be working properly on mobile Chrome, though

Lattyware commented 4 years ago

Ah, yeah. It is totally untested in Edge as I don't run a Windows environment so it is awkward to test for it. I was hoping that since modern Edge is just WebKitBlink it'd probably have similar properties to Chrome.

vendors is all the dependency code, so this isn't a bug in the main code-base. I'd suspect this is probably an issue of a missing browser feature or something (because Edge), so the solution may be tweaking the target for Babel.

TheChilliPL commented 4 years ago

Going back to the original issue: Seems like the Aa button changes the string to a Title Case, not a Sentence case like it should be e.g. at the beginning of a card

Lattyware commented 4 years ago

Ah, yeah, don't know when that got introduced, but even at a glance I can see this mistake causing that:

In _cards.scss:

.capitalize:first-child is .capitalize where it is the first child, what we want is .capitalize > :first-child—the first child of .capitalize.

Thanks for the spot.

TheChilliPL commented 4 years ago

You could even add title case as a separate option in the future when you update Many Decks—I could see some cases it'd be useful