[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Review Request 127054: Add a Filter Toolbar Button for Dolphin
From:       Thomas Pfeiffer <colomar () autistici ! org>
Date:       2016-03-15 21:53:30
Message-ID: 20160315215330.26442.28410 () mimi ! kde ! org
[Download RAW message or body]

--===============6864779121157717843==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit



> On March 14, 2016, 11 a.m., Thomas Lübking wrote:
> > dolphinviewcontainer.cpp, line 320
> > <https://git.reviewboard.kde.org/r/127054/diff/7/?file=450012#file450012line320>
> > 
> > tarzan speech - try "filterBarHasFocus"
> > 
> > nb. that this shortcut solution only works as long as any non-shortcut action \
> > trigger (toolbutton, menu) acquires the input focus on interaction. 
> > That's not guaranteed and should at least be commented as a caveat.
> 
> arnav dhamija wrote:
> I have made this change and I have included a warning, but I don't understand why a \
> non-shortcut action trigger won't guarantee setting the focus to the filter bar. \
> Why won't setFocus() always work? 
> Thomas Lübking wrote:
> No, that's a misunderstanding (and incredibly bad wording from my side ;-)
> 
> Show the filter (no matter how), focus something different (eg. the url editor or \
> the icon view) and click the toggle button. The filter will not hide.
> 
> Now assume any action trigger would require to move the focus away from the filter \
> to be invoked - the trigger could never toggle (it would unfocus the filter, the \
> code figure the filter isn't focused and move the focus there instead of hiding it \
> as could be expected from a toggling toolbutton) 
> The correct™ (Thomas P.?) behavior would be to only move the focus to a visible \
> filter if the action is triggered by the shortcut, what however requires \
> forementioned event handler to check what triggered the action (whether it's a \
> shortcut, to be precise)

Thomas Lübking is right: Using the button to focus the filter does not make sense, \
anyway. If the user is using the mouse anyway, they may as well just click the filter \
edit field instead of the button.


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127054/#review93502
-----------------------------------------------------------


On March 15, 2016, 9:47 a.m., arnav dhamija wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127054/
> -----------------------------------------------------------
> 
> (Updated March 15, 2016, 9:47 a.m.)
> 
> 
> Review request for Dolphin, KDE Usability and Emmanuel Pescosta.
> 
> 
> Repository: dolphin
> 
> 
> Description
> -------
> 
> This patch was created to implement the feature suggested here: \
> [https://todo.kde.org/?controller=task&action=show&task_id=966](https://todo.kde.org/?controller=task&action=show&task_id=966)
>  
> This patch adds a Filter Button to the toolbar of Dolphin. This button can be \
> toggled to show/hide the Filter Bar. 
> In this patch, one might notice that there is now show_filter_bar and \
> show_filter_bar_button in dolphinui.rc file. This was done because I found that \
> using the same action for the menu entry and the toolbar entry would cause \
> something to break (eg, shortcuts would stop working).  
> A screenshot of the toolbar is also attached.
> 
> 
> Diffs
> -----
> 
> dolphinmainwindow.h 7003e94 
> dolphinmainwindow.cpp f7a7613 
> dolphinviewcontainer.h 62f9110 
> dolphinviewcontainer.cpp 8fea3ba 
> 
> Diff: https://git.reviewboard.kde.org/r/127054/diff/
> 
> 
> Testing
> -------
> 
> manual
> 
> 
> File Attachments
> ----------------
> 
> dolphintoolbar.png
> https://git.reviewboard.kde.org/media/uploaded/files/2016/02/12/d936e5d0-557c-45c5-9a2d-f849e5d284a6__dolphintoolbar.png
>  
> 
> Thanks,
> 
> arnav dhamija
> 
> 


--===============6864779121157717843==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127054/">https://git.reviewboard.kde.org/r/127054/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 14th, 2016, 11 a.m. UTC, <b>Thomas \
Lübking</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  


<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/127054/diff/7/?file=450012#file450012line320" \
style="color: black; font-weight: bold; text-decoration: \
underline;">dolphinviewcontainer.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">320</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="kt">bool</span> <span class="n">DolphinViewContainer</span><span \
class="o">::</span><span class="n">filterBarFocus</span><span \
class="p">()</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">tarzan speech - try "filterBarHasFocus"</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">nb. \
that this shortcut solution only works as long as any non-shortcut action trigger \
(toolbutton, menu) acquires the input focus on interaction.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">That's not guaranteed and should at least be commented as a \
caveat.</p></pre>  </blockquote>



 <p>On March 15th, 2016, 9:47 a.m. UTC, <b>arnav dhamija</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I \
have made this change and I have included a warning, but I don't understand why a \
non-shortcut action trigger won't guarantee setting the focus to the filter bar. Why \
won't setFocus() always work?</p></pre>  </blockquote>





 <p>On March 15th, 2016, 9:21 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">No, \
that's a misunderstanding (and incredibly bad wording from my side ;-)</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Show the filter (no matter how), focus something different (eg. the url \
editor or the icon view) and click the toggle button. The filter will not hide.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Now assume any action trigger would require to move \
the focus away from the filter to be invoked - the trigger could never toggle (it \
would unfocus the filter, the code figure the filter isn't focused and move the focus \
there instead of hiding it as could be expected from a toggling toolbutton)</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">The correct™ (Thomas P.?) behavior would be to only move the focus to a \
visible filter if the action is triggered by the shortcut, what however requires \
forementioned event handler to check what triggered the action (whether it's a \
shortcut, to be precise)</p></pre>  </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Thomas Lübking is right: Using the button to focus the filter does not \
make sense, anyway. If the user is using the mouse anyway, they may as well just \
click the filter edit field instead of the button.</p></pre> <br />




<p>- Thomas</p>


<br />
<p>On March 15th, 2016, 9:47 a.m. UTC, arnav dhamija wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Dolphin, KDE Usability and Emmanuel Pescosta.</div>
<div>By arnav dhamija.</div>


<p style="color: grey;"><i>Updated March 15, 2016, 9:47 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
dolphin
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This patch was created to implement the feature \
suggested here: <a href="https://todo.kde.org/?controller=task&amp;action=show&amp;task_id=966" \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">https://todo.kde.org/?controller=task&amp;action=show&amp;task_id=966</a></p>
 <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This patch adds a Filter Button to the toolbar of \
Dolphin. This button can be toggled to show/hide the Filter Bar.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">In this patch, one might notice that there is now show_filter_bar and \
show_filter_bar_button in dolphinui.rc file. This was done because I found that using \
the same action for the menu entry and the toolbar entry would cause something to \
break (eg, shortcuts would stop working). </p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">A screenshot of the \
toolbar is also attached.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">manual</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>dolphinmainwindow.h <span style="color: grey">(7003e94)</span></li>

 <li>dolphinmainwindow.cpp <span style="color: grey">(f7a7613)</span></li>

 <li>dolphinviewcontainer.h <span style="color: grey">(62f9110)</span></li>

 <li>dolphinviewcontainer.cpp <span style="color: grey">(8fea3ba)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/127054/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/02/12/d936e5d0-557c-45c5-9a2d-f849e5d284a6__dolphintoolbar.png">dolphintoolbar.png</a></li>


</ul>




  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============6864779121157717843==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic