Improve appearance of click-to-copy confirmation message #579
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since originally authoring the pull request that implemented this feature (#441), I have noticed a few ways it could be better.
Firstly, there is an issue when the damage calculation message has a certain length, such that the hidden element that appears on click is pushed to a second line, while no text is there. This results in the abnormality shown in the screenshots below:
The layout is pushed down by a blank line that accommodates the hidden element.
In order to fix it, I have changed the position of the confirmation message to appear above the text. I have set its position to absolute, so it will not interfere with the rest of the layout.
Below are three screenshots of how it looks, including two extreme cases of a very short output message, and a very long individual move output. Please let me know if there are any other cases I should consider for the position of the message.
Secondly, I reduced the duration of the appearance from 2s to 1.5s, because I found it lingered for too long.
Thanks.