Closed Bug 1380352 Opened 7 years ago Closed 7 years ago

Comment box should be vertically resizable (and not horizontally resizable)

Categories

(bugzilla.mozilla.org :: General, defect, P1)

Production
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: dylan, Assigned: wlach)

References

Details

Attachments

(1 file)

45 bytes, text/x-github-pull-request
dylan
: review+
Details | Review
      No description provided.
We should probably also turn off ('destroy') the autosizer on the text area if it is ever manually resized (this seems to be the behaviour of github and similar sites).
This is slightly important but not enough for me to do right now, as it seems harder. Probably requires tweaking the autosizer code itself.
Assignee: dylan → nobody
Priority: -- → P3
Assignee: nobody → dylan
Priority: P3 → P1
This is now slightly more important due to concerns raised by :bz
See Also: → 1381200
Dylan: let me know if you want me to look into this. I can spare a few cycles.
Experimental plunker modifying behaviour of autosizer to allow vertical resizing (and disable itself if it is ever manually resized): http://plnkr.co/edit/75dgvwaCh4LhqMSxASPj

Still not handling at least one edge case correctly (can't resize higher if already at max height without reducing first)
even with "stop autoresizing on manual resize event" way, the current maximum height is problematic.
it has only 269px for me, that can contain only 16-17 lines, while comment can easily become longer when replying (like more than 50 lines).
so, if people don't manually resize, the autoresize stops at not-enough size.
can you also tweak the maximum height of autoresize as well?
Flags: needinfo?(wlachance)
(In reply to Tooru Fujisawa [:arai] from comment #6)
> even with "stop autoresizing on manual resize event" way, the current
> maximum height is problematic.
> it has only 269px for me, that can contain only 16-17 lines, while comment
> can easily become longer when replying (like more than 50 lines).
> so, if people don't manually resize, the autoresize stops at not-enough size.
> can you also tweak the maximum height of autoresize as well?

Increasing the maximum size is as easy as tweaking a number (max-height for the comment css selector). I don't really have a strong opinion on what it should be -- I semi-arbitrarily set it to 280px based on what github does, but it's possible it should be higher for bugzilla based on how people use our site. On Linux, the old default size of the comment box was about 387px when clicked (25 rows) -- that might be a sensible default here. After this patch lands, people can just resize if they want more as they did before.
Flags: needinfo?(wlachance)
Attached file PR
This tweaks the autosizer behaviour to work as we discussed. I tried to give it a thorough testing, but it's somewhat complex so I would appreciate another set of eyes on it.
Assignee: dylan → wlachance
Attachment #8887238 - Flags: review?(dylan)
(In reply to William Lachance (:wlach) (use needinfo!) from comment #7)
> (In reply to Tooru Fujisawa [:arai] from comment #6)
> > even with "stop autoresizing on manual resize event" way, the current
> > maximum height is problematic.
> > it has only 269px for me, that can contain only 16-17 lines, while comment
> > can easily become longer when replying (like more than 50 lines).
> > so, if people don't manually resize, the autoresize stops at not-enough size.
> > can you also tweak the maximum height of autoresize as well?
> 
> Increasing the maximum size is as easy as tweaking a number (max-height for
> the comment css selector). I don't really have a strong opinion on what it
> should be -- I semi-arbitrarily set it to 280px based on what github does,
> but it's possible it should be higher for bugzilla based on how people use
> our site. On Linux, the old default size of the comment box was about 387px
> when clicked (25 rows) -- that might be a sensible default here. After this
> patch lands, people can just resize if they want more as they did before.

I filed bug 1381742 for this issue, which is strictly seperate.
Attachment #8887238 - Flags: review?(dylan) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Any reason why the behaviour of the comment box has changed again?
Now it has resize:vertical when yesterday(?) I could resize it diagonally.

Also the "Expand the comment box dynamically" preference doesn't have any effect since with On and Off you get the same resize:vertical.

Can I please be able to shape the comment box into any shape I want. Sometimes I need to make it narrower/wider to see how text will wrap in the e-mail being sent out.

Personally I find it very annoying that the "dotted corner" seems to suggest that I can do anything I want with the box, but when come to resize it, I find out that the web designer claims to know my needs better than I do (which is clearly not the case).
Flags: needinfo?(dylan)
Blocks: 1386529
(In reply to Jorg K (GMT+2) from comment #10)
> Any reason why the behaviour of the comment box has changed again?
> Now it has resize:vertical when yesterday(?) I could resize it diagonally.
> 
> Also the "Expand the comment box dynamically" preference doesn't have any
> effect since with On and Off you get the same resize:vertical.
> 
> Can I please be able to shape the comment box into any shape I want.
> Sometimes I need to make it narrower/wider to see how text will wrap in the
> e-mail being sent out.

We should probably need to make some of the autosizing css conditional on the preference:

https://github.com/mozilla-bteam/bmo/blob/b91128a6b902b610c9adceb2207c86422e3ea241/extensions/BugModal/web/bug_modal.css#L717
https://github.com/mozilla-bteam/bmo/blob/b91128a6b902b610c9adceb2207c86422e3ea241/extensions/BugModal/web/bug_modal.css#L718

> Personally I find it very annoying that the "dotted corner" seems to suggest
> that I can do anything I want with the box, but when come to resize it, I
> find out that the web designer claims to know my needs better than I do
> (which is clearly not the case).

Please don't assume bad intent ("claims to know my needs better than I do"). It's really demotivating.
Flags: needinfo?(dylan)
(In reply to William Lachance (:wlach) (use needinfo!) from comment #11)
> Please don't assume bad intent ("claims to know my needs better than I do").
> It's really demotivating.
No bad intent assumed, but please consider the history and circumstances.

I am the Thunderbird maintainer and also a Firefox contributor. I spend hours each day typing into this comment box, like right now.

Until recently I was using the "classic" interface until the "modal" interface arrived. It took me some time to get used to the modal interface, but in the end I think it's more powerful.

Then at some stage I wasn't able to resize the comment box any more the way I needed it. I opened up bug 1381200 to complain about the restriction to only resize horizontally. This bug got fixed, an option was implemented to choose between "free resizing" and "system intended resizing". I was happy, see bug 1380389 comment #5.

And now this got changed again, with no apparent reason for the user. In fact, the "free resizing" option introduced in bug 1380389 stopped working, and does nothing now as far as I can see.

So, no bad intent assumed, but the system (accidentally?) lost an option what was implemented for a reason.

Just a personal note: I prefer to use systems, like open source software, where users can determine their own workflows over closed system where the manufacturer decides for them how they should work, and anything outside the "pre-conceived" use case generally doesn't work.

So please accept my apologies should I have expressed my frustration in a way you found demotivating.
(In reply to Jorg K (GMT+2) from comment #12)
> (In reply to William Lachance (:wlach) (use needinfo!) from comment #11)
>
> So, no bad intent assumed, but the system (accidentally?) lost an option
> what was implemented for a reason.

Yes, it was accidental. I suspect the root cause of that is that the feature (autosizing) was developed seperately from the functionality to turn it off. Some changes to the feature (ironically to address concerns like lack of ability to resize manually when enabled) seem to have been merged in without the "turned off altogether" use case taken into account. It's unfortunate that this happened, but here we are.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: