[RELEASED] Add Notes - select names

May 31, 2021 5:21 am
Sending notes is a bit of a pain. Not all users have usernames with memorable spelling.

I'd suggest that when a user clicks "Notes" on a page with a characters menu at the bottom then it shows a dialog where names can be selected.

Implementation. Rather than user colorbox with its iframe implementation, I'd use the username data already collected in /fixedGameMenu.php and put it in a hidden div - then style that like colorbox. Why have an extra call to the server when we already have the data?

javascript/markItUp/sets\bbcode/set.js defines the current commands. I wonder whether perhaps we should have two different toolbars - one for games and one for everywhere else. Game forums are different and a game toolbar helps emphasise this - I image there might be other things we might add to a game toolbar.
Last edited June 14, 2021 8:01 am
Jun 1, 2021 12:05 pm
Discussion of possible implementation:

https://i.imgur.com/AKzMupX.png

When in a game, the notes button becomes a dropdown with a list of players in that game.
Clicking the player names toggles the tick next to their name.
Clicking "Add note" at the bottom of that list adds the note populated with the selected players.

https://i.imgur.com/ohFjpZK.png

Clicking the note button instead of the dropdown just gives a blank note="".
Implementation notes

1. We make a distinction between game editors and other editors (just PMs?). I'd like a richer game editor in time, so this change is also a manifesto - a statement of intent (the alternative would be add an "if has game footer..." in the existing editor js).

/javascript/js.php
https://i.imgur.com/LCb3gwB.png

2. The game menu has a hidden unordered list of the players. Could I have used JSON? Sure, but a hidden ul seems semantically correct to me.

/fixedGameMenu.php
https://i.imgur.com/U0yN37T.png

3. Just some plain old javascript and CSS in our new Markit game-forum-set.js

https://i.imgur.com/5sxzVeD.png
Jun 3, 2021 2:31 pm
v2 is definitely going to be a better WYSIWYG; if you can think of a quick better replacement for the current, I'm open to it. Eitherwise, this sounds good.
Jun 7, 2021 9:31 am
I've added this to my repository but will add some more features before making a pull request.

I noticed that newThread doesn't check whether to display the game menu.

I've fixed this on my db with:
UPDATE dispatch SET fixedGameMenu=1 WHERE url='forums/newThread/';

You do not have permission to post in this thread.