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

Fix tooltip and move replace in selected cells button. #567

Merged
merged 4 commits into from
Oct 21, 2015

Conversation

jdfreder
Copy link
Contributor

@jdfreder jdfreder commented Oct 9, 2015

partially closes #558

@jdfreder jdfreder added this to the 4.1 milestone Oct 9, 2015
@jdfreder jdfreder mentioned this pull request Oct 9, 2015
7 tasks
.append(onlySelectedButton)
)
$('<div/>')
.addClass('input-group')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just append the repl, rather than appending the input group div, and then putting repl inside that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That causes it to render incorrectly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my PR to yours, which does what I was suggesting (though I may have not been clear) and seems to render fine, at least on Chrome where I was testing.

@ellisonbg
Copy link
Contributor

This is a good start to that. A few points:

After playing with it for a while, I find a couple of borders are missing. Here is a screenshot:

screen shot 2015-10-12 at 6 03 33 pm

The left border of the "Replace" text area and the right border of the selection checkbox.

@jasongrout
Copy link
Member

@jdfreder - I put in a PR to your PR.

@ellisonbg - I also saw that and I fixed that in my PR to @jdfreder.

@jasongrout
Copy link
Member

@jdfreder, I'm also seeing a 1-2 pixel difference between the buttons and the input area. The buttons I think are sized to 32px, but the input area isn't, so there's a dissonance between the two.

@@ -166,14 +165,14 @@ define(function(require){
.addClass("fa fa-check-square-o")
)
.attr('data-toggle','button')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also replace the faux checkbox button with a real checkbox!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or change the icon to fa-square-o (to indicated a "selected" border)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the button is already a toggle button, I don't think it makes sense to add a checkbox too. I'd either need to sync the check state with the button state or keep the checkbox static. Not to mention, on some operating systems/browsers, check boxes aren't that pretty.

The fa-square-o idea is easy though, @ellisonbg would you like that?

@jdfreder
Copy link
Contributor Author

@jasongrout ah, that missing border is what I thought was a consequence of simplifying the border. I didn't notice it was gone even with the code as is. I merged your PR

@Carreau
Copy link
Member

Carreau commented Oct 14, 2015

-1 to move the checkbox. The re and case sensitive change the meaning of the text which is in the search field. The check box apply only to where it will apply. After using the SnR for some time, especially with the keyboard, I find out that I was selecting the "replace only in selected" only after entering the replace text. and having after the replace filed made it much more convenient to reach with tab.

I was at the beginning with the other 2 button, and it was annoying. I moved it after on purpose.

@ellisonbg
Copy link
Contributor

Shouldn't the checkbox also affect which cells the search is done in. If
you want to do a replace, why would you search more widely that you know
you will replace on. Also, I think it would be very useful to be able to
"just search" on selected cells.

On Wed, Oct 14, 2015 at 2:39 PM, Matthias Bussonnier <
[email protected]> wrote:

-1 to move the checkbox. The re and case sensitive change the meaning of
the text which is in the search field. The check box apply only to where it
will apply. After using the SnR for some time, especially with the
keyboard, I find out that I was selecting the "replace only in selected"
only after entering the replace text. and having after the replace
filed made it much more convenient to reach with tab.

I was at the beginning with the other 2 button, and it was annoying. I
moved it after on purpose.


Reply to this email directly or view it on GitHub
#567 (comment).

Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]

@Carreau
Copy link
Member

Carreau commented Oct 14, 2015

Yes for "Just search", though harder to do that SnR, not sure about the UI for that.

I think the browser Search is better for just search.

From my personal use, I know I want to search and replace, it just append to replace in places where I am not expecting to find what I am searching so my workflow is the following:

  • search for Foo
  • replace by Bar
  • oh it also replace in place I am not expecting.
  • deselect where I do not want it to replace.

Technically I would like a checkbox next to each preview, and be able to individually deselect some results (à la textmate).

Hence why I placed the checkbox after as it is the last action I before validating.

@ellisonbg
Copy link
Contributor

I should clarify my feelings about the select button:

  • First, let's make it a real checkbox rather than a
    faux-checkbox-button--pretending-to-be-a-checkbox.
  • Second, make sure it has a tolltip (probably does)
  • Possibly move to the beginning of the replace so it has symmetry with the
    other buttons being on the left.
  • With these changes and your description, I think it would be fine to
    leave below with replace.

On Wed, Oct 14, 2015 at 3:03 PM, Matthias Bussonnier <
[email protected]> wrote:

Yes for "Just search", though harder to do that SnR, not sure about the UI
for that.

I think the browser Search is better for just search.

From my personal use, I know I want to search and replace, it just append
to replace in places where I am not expecting to find what I am searching
so my workflow is the following:

  • search for Foo
  • replace by Bar
  • oh it also replace in place I am not expecting.
  • deselect where I do not want it to replace.

Technically I would like a checkbox next to each preview, and be able to
individually deselect some results (à la textmate).

Hence why I placed the checkbox after as it is the last action I before
validating.


Reply to this email directly or view it on GitHub
#567 (comment).

Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]

@Carreau
Copy link
Member

Carreau commented Oct 14, 2015

  • First, let's make it a real checkbox rather than a
    faux-checkbox-button--pretending-to-be-a-checkbox.

No objection. Design-wise, it might be less pretty, but fair enough.

  • Possibly move to the beginning of the replace so it has symmetry with the
    other buttons being on the left.

it make keyboad usage a bit harder. I would prefer tab/shift tab to move quickly between search and replace field, if we put it before, it will be 2 press. We can change the tabindex, but then the tab selection order might be confusing.

No objection to try, though I want to keep the keyboard usability in mind.

@jdfreder
Copy link
Contributor Author

  • First, let's make it a real checkbox rather than a
    faux-checkbox-button--pretending-to-be-a-checkbox.

I'm still slightly minus one on this for the reasons I stated above, which you may have missed:

Because the button is already a toggle button, I don't think it makes sense to add a checkbox too. I'd either need to sync the check state with the button state or keep the checkbox static. Not to mention, on some operating systems/browsers, check boxes aren't that pretty.

@Carreau
Copy link
Member

Carreau commented Oct 21, 2015

Merging to test it.

Carreau added a commit that referenced this pull request Oct 21, 2015
Fix tooltip and move replace in selected cells button.
@Carreau Carreau merged commit c40400c into jupyter:master Oct 21, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search and Replace issues
4 participants