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

"Leading blanks" option to Column / Multi-Selection Editor #11148

Closed
owenduffy opened this issue Feb 7, 2022 · 27 comments
Closed

"Leading blanks" option to Column / Multi-Selection Editor #11148

owenduffy opened this issue Feb 7, 2022 · 27 comments
Assignees

Comments

@owenduffy
Copy link

Description of the Issue / enhancement

Please add "Leading blanks" option to Column / Multi-Selection Editor.

Expected Behavior

Leading blanks would allow preserving column width. Leading zeros is not an option for languages that give leading zero special import, eg octal format.

@alankilborn
Copy link
Contributor

@donho

Any objection to me tackling this one?

@owenduffy
Copy link
Author

I might have been a little brief.

Screenshot-230304092831

What I would find very useful is to also have a leaking blanks tick box.

@alankilborn
Copy link
Contributor

I might have been a little brief.

I thought it was clear.

@donho
Copy link
Member

donho commented Mar 3, 2023

Yes, why not?

Rather a choice Leading (combobox) among None, Zeros and White spaces.
(Not sure in choice combobox we should use singular or plural)

Squeeze a little more in the following zones:

  1. Text to Insert
  2. "Initial number", "Increase by" and "Repeat"
  3. Format zone

to make room choice Leading right after "Repeat", in order to avoid the confusion.

@alankilborn Should I assign this issue to you?

@alankilborn
Copy link
Contributor

Should I assign this issue to you?
Yes, please.

@pryrt and I had some offline discussion about UI several hours ago:
We liked 2 checkboxes only:

  • Leading zeros
  • Leading spaces

Checking one checkbox would uncheck the other.
We thought this would save space (only 2 not 3 choices) and no groupbox necessary.
Is that acceptable?
Or should I go with your proposed design?

@donho
Copy link
Member

donho commented Mar 4, 2023

@alankilborn

We thought this would save space (only 2 not 3 choices) and no groupbox necessary.

If it's a combobox (as I said), then there's only one control which contains 3 choices.

@alankilborn
Copy link
Contributor

@donho,

Understood.
For some reason, on first reading, I thought you had said groupbox. Clearly not.
Will proceed...

@alankilborn
Copy link
Contributor

@donho


Should I assign this issue to you?
Yes, please.

So far, you haven't assigned me...


a choice Leading (combobox) among None, Zeros and White spaces.

I considered the UI more fully perhaps and was wondering if we could make this change, as it more accurately describes the feature:

Full-width Padding:     (combobox, P underlined)
    Trailing Spaces     <-- the default
    Leading Spaces
    Leading Zeros

@donho
Copy link
Member

donho commented Mar 5, 2023

@alankilborn

So far, you haven't assigned me...

Done

I considered the UI more fully perhaps and was wondering if we could make this change, as it more accurately describes the feature:

Sorry I don't follow you at all.
What are you talking about?

@alankilborn
Copy link
Contributor

@Yaron10, do you have some input on this issue?

@donho
Copy link
Member

donho commented Mar 5, 2023

Trailing Spaces has nothing to do with this feature.
Ideally we want to make a feature that can run, swim and fly - but we will get a stuff which doesn't run fast, flies no high and just floats on the water. In order to avoid the confusion of users, let's make it do only one thing, and do it well.

@Yaron10
Copy link

Yaron10 commented Mar 5, 2023

@donho,

Trailing Spaces has nothing to do with this feature.

The purpose of Leading Zeros & Leading Spaces is keeping the column's width equal in all lines.
I suppose that @alankilborn thought it could be achieved with Trailing Spaces as well.

@alankilborn,

Why would one want to align numbers to the left (Trailing Spaces)?

Regardless:
I would suggest to align the ComboBox - or rather its title (Leading Characters: ?) - with Increase by: instead of Repeat:.
Increase by: makes the "padding" relevant.

@donho
Copy link
Member

donho commented Mar 5, 2023

@Yaron10

Regardless:
I would suggest to align the ComboBox - or rather its title (Leading Characters: ?) - with Increase by: instead of Repeat:.
Increase by: makes the "padding" relevant.

Thank you for your suggestion.

But I don't see how and why the ComboBox "Leading" should be aligned with Increase by:.
It's an feature which is independent of all other options - that's why I suggested:

Squeeze a little more in the following zones:

  1. Text to Insert
  2. "Initial number", "Increase by" and "Repeat"
  3. Format zone

to make room choice Leading right after "Repeat", in order to avoid the confusion.

for having the result:

Initial number: X
Increase by: X
Repeat: X
Leading (choice)

Hope my intention is more clear now.

@Yaron10
Copy link

Yaron10 commented Mar 5, 2023

@donho,

But I don't see how and why the ComboBox "Leading" should be aligned with Increase by:.
It's an feature which is independent of all other options - that's why I suggested:

I haven't used this dialog frequently, and I might be missing something.

If Increase by: (and Repeat:) did not exist, would Leading be relevant? Wouldn't it be just like Text to Insert?
Or if Increase by: is empty, does Leading being checked/unchecked make any difference?
One can even argue that Leading should be disabled in that case. :)

Regarding the final layout: I was looking at the current dialog and thought that it shouldn't be aligned with Repeat: but rather with Increase by:.
(Again - as I understand it, Increase by: is the first option which makes Leading relevant).

But your proposed layout looks good. 👍

Thank you.

@Yaron10
Copy link

Yaron10 commented Mar 5, 2023

@donho,

I'll try to clarify my point.
if Initial number contains 999 and Increase by is empty, does Leading being checked/unchecked make any difference?
If Increase by contains 1, Leading being checked/unchecked makes the difference between

0999
1000

and

999
1000

@Yaron10
Copy link

Yaron10 commented Mar 5, 2023

Playing with it a bit more (and with a mono-spaced font), I understand @alankilborn's Trailing Spaces and why he suggested it should be default.
This is actually the current behavior if Leading is unchecked.

@donho
Copy link
Member

donho commented Mar 5, 2023

@Yaron10

If Increase by: (and Repeat:) did not exist, would Leading be relevant? Wouldn't it be just like Text to Insert?
Or if Increase by: is empty, does Leading being checked/unchecked make any difference?

What you have observed and your arguments make sense.
From my viewpoint, Leading combobox could depends on Increase by:, but not necessarily:
If Increase by: is not empty or not zero, then Leading comboxbox will do the padding with 0 or white spaces, if one of both is chosen and if there is room to do the padding.
Otherwise Leading combobox just does nothing, whichever its value, because there is no room to do the padding - it obeys the rule, whatever is the value of 3 edit controls.

I'll try to clarify my point.
if Initial number contains 999 and Increase by is empty, does Leading being checked/unchecked make any difference?
If Increase by contains 1, Leading being checked/unchecked makes the difference between...

There is an example (which is contrary yours):
User selects in column mode only 9 lines, and the value of Increase by: is 1 - no difference, Leading or not.

My point is, Leading option is independent of all other options, as it obeys the rule.

I understand @alankilborn's Trailing Spaces and why he suggested it should be default.
This is actually the current behavior if Leading is unchecked.

There must be somethings I'm missing, or I misunderstand what it means "Trailing Spaces" totally. Could you elaborate it please? (Maybe with an illustration)

@Yaron10
Copy link

Yaron10 commented Mar 6, 2023

@donho,

I'm exhausted, and reading your reply deserves a clear mind. :)
Let's please continue tomorrow.

Thank you and good night.

@alankilborn
Copy link
Contributor

I asked for Yaron10's contribution here, because I thought he was familiar with all of Notepad++ and would instantly understand my most recent suggestion. Unfortunately, perhaps this was not the case. No problem, not everyone can be familiar with everything. :-)


So...here I go with more explanation, to hopefully clarify:

Using "Leading" for a new control label here is not the best idea IMO, because "padding" (what the control is really controlling) can be either to the left of the inserted numbers (in which case it IS leading), or it can be to the right of the inserted numbers (in which case it is NOT leading, it is trailing).

Here's an example of the way it currently works, with Leading zeros uncheckmarked:

Start with:

image

and do this:

image

to obtain:

image

Note that on lines 1 through 9 there is a (trailing) space inserted after the number that is inserted. Thus, if the existing behavior is to be retained for the revision of some part of the feature, calling it "Leading" is, well, misleading.


My suggestion to label the control as "Full-width padding" was to mean that if the inserted number is less than the number of digits in the widest number that will be inserted through all of the lines, padding will occur to achieve "full-width".

Maybe there should be FOUR choices to the combobox control, not only THREE:

  1. "Full-width Padding" combobox, set to "None":
    (Note this is not currently achievable in 8.5)
aa1a
aa2a
aa3a
aa4a
aa5a
aa6a
aa7a
aa8a
aa9a
aa10a
aa11a
  1. "Full-width Padding" combobox, set to "Trailing spaces":
    (Achievable in 8.5 by having Leading zeros unchecked)
aa1 a
aa2 a
aa3 a
aa4 a
aa5 a
aa6 a
aa7 a
aa8 a
aa9 a
aa10a
aa11a
  1. "Full-width Padding" combobox, set to "Leading spaces":
    (Note this is not currently achievable in 8.5)
aa 1a
aa 2a
aa 3a
aa 4a
aa 5a
aa 6a
aa 7a
aa 8a
aa 9a
aa10a
aa11a
  1. "Full-width Padding" combobox, set to "Leading zeros":
    (Achievable in 8.5 by having Leading zeros checked)
aa01a
aa02a
aa03a
aa04a
aa05a
aa06a
aa07a
aa08a
aa09a
aa10a
aa11a

If there is no possibility for padding at all, the new control is not meaningful and will not affect the output when the command (in the screenshots above) is executed, example:

Start with:

image

End with:

image

(The numbers inserted all are single-digit, so there is nothing extra inserted)


So, in SUMMARY, my suggestion is to remove Leading Zeros checkbox and replace it with a combobox with the label "Full-width Padding :" and give the combobox four string values:

  • None
  • Trailing spaces
  • Leading spaces
  • Leading zeros

"Trailing spaces" would be the default, as that is the current default when Leading zeros checkbox is unchecked (the default in 8.5)

@Yaron10
Copy link

Yaron10 commented Mar 6, 2023

@donho,

From my viewpoint, Leading combobox could depends on Increase by:, but not necessarily:
...
There is an example (which is contrary yours):
User selects in column mode only 9 lines, and the value of Increase by: is 1 - no difference, Leading or not.

I hope I understand you correctly.

It's true that Leading may not have any effect even if Increase by > 0.
But Leading can not have any effect if Increase by did not exist or if Increase by < 1.

Checking Case Sensitive in Search, may or may not affect the results.
But in our native languages Chinese and Hebrew - the CaSe concept does not exist, and therefore Case Sensitive is completely irrelevant.

There must be somethings I'm missing, or I misunderstand what it means "Trailing Spaces" totally. Could you elaborate it please? (Maybe with an illustration)

We were trailing behind @alankilborn. :)
He explained and illustrated it very well.


@alankilborn,

How would you implement None in the following case?

תמונה

Initial number: 999.
Increase by: 1.

@alankilborn
Copy link
Contributor

How would you implement None in the following case?

I presume what you are showing is a 2-line-by-3-column rectangular selection active when the command is invoked?
On my clean setup that shows like this:

image

I suppose a padding selection of (the proposed) "None" choice would cause the following to result:

image

with a virtual-space appearing after the final 9.

@Yaron10
Copy link

Yaron10 commented Mar 6, 2023

And in the following case?
תמונה

Is it useful and worth the more complex code?

@alankilborn
Copy link
Contributor

Maybe the addition of "None" as a padding choice is too much "upscoping" for the current issue.
I'll retract it as an option, since it creates some problems.

@Yaron10
Copy link

Yaron10 commented Mar 6, 2023

@alankilborn,

👍
Thank you for your work. Looking forward to the PR.

@alankilborn
Copy link
Contributor

I would want @donho 's concurrence before starting actual work on this.

The latest proposal is:

Remove Leading Zeros checkbox and replace it with a combobox with the label "Full-width Padding :" and give the combobox three string values:

  • Trailing spaces
  • Leading spaces
  • Leading zeros

"Trailing spaces" would be the default, as that is the current default when Leading zeros checkbox is unchecked (the default in 8.5)

@donho
Copy link
Member

donho commented Mar 6, 2023

@alankilborn Let's do it as simple as possible:

Leading - none
        - zeros
        - spaces

Leading - none

6  Apply tab colors to document list items, and add groups to document list.
7  Add middle mouse click ability to close doc in Document List.
8  Add Begin/End Select in Column Mode command.
9  Add option to make auto-completion list brief.
10 Remove duplicate items in function/word list of Auto-completion.
11 blabla...

Leading - zeros

06 Apply tab colors to document list items, and add groups to document list.
07 Add middle mouse click ability to close doc in Document List.
08 Add Begin/End Select in Column Mode command.
09 Add option to make auto-completion list brief.
10 Remove duplicate items in function/word list of Auto-completion.
11 blabla...

Leading - spaces

 6 Apply tab colors to document list items, and add groups to document list.
 7 Add middle mouse click ability to close doc in Document List.
 8 Add Begin/End Select in Column Mode command.
 9 Add option to make auto-completion list brief.
10 Remove duplicate items in function/word list of Auto-completion.
11 blabla...

@alankilborn
Copy link
Contributor

Let's do it as simple as possible:

OK.
With "none" as the initial default choice, to match 8.5 behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants