Repository navigation
Conversation
1289db7 to
dfc1f6f
Compare
| @@ -24,18 +24,41 @@ final class Room { | |||
| private final List<TimerRequest> timerRequests = new CopyOnWriteArrayList<>(); | |||
| private final Sinks.Many<TimerRequest> sink = | |||
There was a problem hiding this comment.
now that we have two sinks, this name is too generic I think
|
|
||
| @DeleteMapping("/{roomId:[A-Za-z0-9-_]+}/goal") | ||
| @ResponseStatus(HttpStatus.ACCEPTED) | ||
| public void putGoal(@PathVariable String roomId, @RequestBody DeleteGoalRequest deleteGoalRequest) { |
There was a problem hiding this comment.
sollte deleteGoal heißen
| if (newGoal === null && user === null) { | ||
| console.log('Resetting state'); | ||
|
|
||
| goal = null; |
There was a problem hiding this comment.
those two state changes are sort of a transaction, no? When we want the one, we want the other too.
Meant are Lines 564 and 565
| stats.incrementTimer(timer); | ||
| @DeleteMapping("/{roomId:[A-Za-z0-9-_]+}/goal") | ||
| @ResponseStatus(HttpStatus.ACCEPTED) | ||
| public void deleteGoal(@PathVariable String roomId, @RequestBody DeleteGoalRequest deleteGoalRequest) { |
There was a problem hiding this comment.
Why a delete goal? Could be a put to empty goal
| <span class="visually-hidden">Toggle Dropdown</span> | ||
| </button> | ||
| <ul class="dropdown-menu"> | ||
| <li><a class="dropdown-item" onclick="deleteGoal()">🗑️ Delete current goal</a></li> |
There was a problem hiding this comment.
I would name this "Clear" and basically clear the textbox, which would trigger a change event sending an empty string as a goal. Keep it simple.
|
I would not use a modal. Instead, I would use https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable for the display of the goal, and when it is changed, I would trigger events or update it accordingly. Simple UI. |
No description provided.