Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to adjust column width manually #4806

Closed
lozanaross opened this issue Apr 25, 2022 · 9 comments · May be fixed by #6563
Closed

Possibility to adjust column width manually #4806

lozanaross opened this issue Apr 25, 2022 · 9 comments · May be fixed by #6563
Assignees
Labels
columns Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements.
Milestone

Comments

@lozanaross
Copy link

lozanaross commented Apr 25, 2022

Right now column width is generated arbitrarily based on content of the column headers and/or data values - this can be very problematic particularly with XML files where the column headers and sometimes the data values can be quite lengthy if the XML is not particularly well structured, then very wide columns fill up a user's screen - preventing efficient work.

Proposed solution

Ideally, column width should be controlled by the users with a familiar user interaction pattern, such as a dragging motion by the user's cursor, as is the case in other tabular management tools such as Excel / Google sheets, etc.

Alternatives considered

None yet.

Additional context

N/A

@lozanaross lozanaross changed the title UI recommendation to add - possibility to adjust column width manually Possibility to adjust column width manually Apr 25, 2022
@lozanaross lozanaross added the Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. label Apr 25, 2022
@wetneb wetneb added Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements. columns labels Apr 25, 2022
@Lydiaofficial
Copy link

Hi @lozanaross , @wetneb , could you assign this issue to me, please?

@Lydiaofficial
Copy link

Lydiaofficial commented Mar 18, 2023

Iterating on this issue of letting users control and resize column width, here areat 2 (two) alternative solutions that can both work together or separately.

They are:

  1. The dragging motion , as mentioned by @lozanaross
    As stated in the issue, the dragging motion is most likley the preferred and most user centric approach to letting users resize columns by simply dragging their cursor from one end to the other to change the widths of columns. However, resizing column width wll definitely affect the data that is contained in each column as well as its height.

in my iteration, when a user extends the width of a column, it causes the data contained to spread in order to adjust to the column width. Likewise, when column width is shortened, the data contained therefore, breaks into more lines to fit into the shortened column , which in turn elongates the height of each column and row.

The above are shown in these screenshots:
image

image

  1. Alternative proposition.
    Adding the "Resize this column" action/option to edit column dropdown.

This alternative proposition, which can also work alongside the dragging option ,adds the option to resize columns to the edit column options available to OpenRefine users and just below the option to remove a column.

On click, the user is shown a modal to add their desired column width and save and on save, the width added is automatically applied on the column the user chose to resize.

This alternative is further explained in the below screenshots;
image

image

image

Here's a link to fidn all screenshot designs :
https://www.figma.com/file/W3X6vO1Mn36xdkaGPz8cx6/OpenRefine-Issues?node-id=57-3952&t=AFBjN2UUUa6h1iSi-4

@thadguidry
Copy link
Member

@Lydiaofficial is it a click, hold button, drag? holding mouse buttons is sometimes cumbersome for folks. It's a small accessibility issue in some regards. Would be nice to avoid having to hold down the mouse button. A click, drag around until you like it, then click again to release... would be my preferred choice if that's possible. Or some other alternative.

@Lydiaofficial
Copy link

Lydiaofficial commented Mar 18, 2023

@thadguidry I understand the accessibility issue that holding mouse buttons can cause , so rather, it is a click and drag.

The idea is that when users hover on the column lines on the left or right, the drag icon appears and they can click and drag and then click to release.

So yes, it is a "click and drag until you like it and click to release " and definitely is possible.

@lozanaross
Copy link
Author

@Lydiaofficial @wetneb I'm not sure this issue is so appropriate for the Outreachy group. My advice here is not to reinvent the wheel.

Resizing columns in both Excel and Google Sheets (as indicated in my original formulation of the issue) works in exactly the same way (with same mouse cursor design even) and it's thus a very familiar behaviour. The dragging design mockups above miss the point that dragging should only be activated in the title region of each column - enabling dragging anywhere else in a data field (as shown in mockups) will potentially interfere with other possible data operations in that region (clicking hyperlinks, clicking the edit button, hover states after reconciliation, etc).

@thadguidry
Copy link
Member

@lozanaross Oh I didn't catch that, they have mocked up dragging behavior on the vertical column lines as well? (I now see the white barbell arrow) Agree, dragging should only be accomplished against a column header and not anything below them.

@Lydiaofficial
Copy link

@lozanaross Oh thank you for the feedback.
I'll make the necessary corrections.

@lozanaross
Copy link
Author

@Lydiaofficial i am not sure there is much more work to do here, and since you have already made a lot of other contributions, you don't have to do more.

@Lydiaofficial
Copy link

Oh. Alright.
Thank you.

@wetneb wetneb mentioned this issue Apr 25, 2023
8 tasks
wetneb added a commit to wetneb/OpenRefine that referenced this issue May 11, 2023
This is not ready yet because the initial sizing of the columns
has changed and is likely to be less appropriate in many cases
(for instance for columns with long textual content).
wetneb added a commit to wetneb/OpenRefine that referenced this issue May 17, 2023
This is not ready yet because the initial sizing of the columns
has changed and is likely to be less appropriate in many cases
(for instance for columns with long textual content).
wetneb added a commit to wetneb/OpenRefine that referenced this issue May 30, 2023
This is not ready yet because the initial sizing of the columns
has changed and is likely to be less appropriate in many cases
(for instance for columns with long textual content).
wetneb added a commit to wetneb/OpenRefine that referenced this issue May 30, 2023
This is not ready yet because the initial sizing of the columns
has changed and is likely to be less appropriate in many cases
(for instance for columns with long textual content).
wetneb added a commit to wetneb/OpenRefine that referenced this issue May 31, 2023
This is not ready yet because the initial sizing of the columns
has changed and is likely to be less appropriate in many cases
(for instance for columns with long textual content).
wetneb added a commit that referenced this issue May 31, 2023
Closes #4806.

* Improve default layout by initially capping column widths to 300px

* Make resizing area even around column boundaries

* Only keep the mouse event listeners when needed

* Remember widths of all columns for grid re-renderings

* Introduce minimum width on columns for their default sizing

* Set column widths in em so that they are properly resized when zooming
@wetneb wetneb self-assigned this May 31, 2023
@wetneb wetneb added this to the 4.0 milestone May 31, 2023
@wetneb wetneb closed this as completed May 31, 2023
wetneb added a commit that referenced this issue Oct 10, 2023
Closes #4806.

* Improve default layout by initially capping column widths to 300px

* Make resizing area even around column boundaries

* Only keep the mouse event listeners when needed

* Remember widths of all columns for grid re-renderings

* Introduce minimum width on columns for their default sizing

* Set column widths in em so that they are properly resized when zooming
wetneb added a commit that referenced this issue Nov 12, 2023
Closes #4806.

* Improve default layout by initially capping column widths to 300px

* Make resizing area even around column boundaries

* Only keep the mouse event listeners when needed

* Remember widths of all columns for grid re-renderings

* Introduce minimum width on columns for their default sizing

* Set column widths in em so that they are properly resized when zooming
wetneb added a commit to wetneb/OpenRefine that referenced this issue Apr 24, 2024
wetneb added a commit to wetneb/OpenRefine that referenced this issue Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
columns Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants