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

List:       kde-panel-devel
Subject:    Re: Review Request 125921: Don't rely graphic objects in panel script engine
From:       "Marco Martin" <notmart () gmail ! com>
Date:       2015-11-02 17:07:59
Message-ID: 20151102170759.7259.75870 () mimi ! kde ! org
[Download RAW message or body]

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


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


good direction, just a little point below


shell/scripting/panel.cpp (line 124)
<https://git.reviewboard.kde.org/r/125921/#comment60293>

    I think i would feel better if this was shared with panelview, to save possible \
very weird bugs (i wonder if it could be made static from panelview)


- Marco Martin


On Nov. 2, 2015, 4:26 p.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125921/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2015, 4:26 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-workspace
> 
> 
> Description
> -------
> 
> The basic design of Plasma is that scripts and and the shell (in theory)
> manipulate a tree of basic applet geometry and configs.
> 
> Plasmashell then reacts to those changes and displays them visually with
> a distinct separation between the layout and UI.
> 
> Panel's scriptengine seemed to do away with all, and try and manipulate the graphic \
> object directly..which might not exist and that leads to complex code. 
> This changes it to read/write from the same config object as
> PanelView will use. More akin to how the script engine for applet and contiainment \
> work. 
> If there's a view for this panel, we update immediately, otherwise it'll just get \
> loaded when it's needed. PanelView::reload() has the error checking/bounds \
> management so no point duplicating that. 
> Idea is to fix the same bug as https://git.reviewboard.kde.org/r/125920/ but also \
> clean up a lot of the code which I thought had grown a bit complex.  
> Bit too big to backport though. Might be Plasma 5.6 material at this point.
> 
> 
> Diffs
> -----
> 
> shell/panelview.cpp 2a80a65a9bbcaaad82a52e28525c73e816046a3d 
> shell/scripting/panel.h f7279100a7c79f2f15917b88d8199573a379cb7d 
> shell/scripting/panel.cpp bd78fc9b9dd95770126007777b2d41e3822e95ae 
> 
> Diff: https://git.reviewboard.kde.org/r/125921/diff/
> 
> 
> Testing
> -------
> 
> Modified my layout.js to set min, max sizes as well as alignment and offset which \
> were previously broken. 
> Once loaded opened the interactive editor and run stuff like:
> panel = panelById(1);
> panel.alignment = "center"
> panel.height = 40
> 
> Seems to work as before
> 
> 
> Thanks,
> 
> David Edmundson
> 
> 


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




<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/125921/">https://git.reviewboard.kde.org/r/125921/</a>
  </td>
    </tr>
   </table>
   <br />





 <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;">good \
direction, just a little point below</p></pre>  <br />







<div>



<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/125921/diff/1/?file=414430#file414430line124" \
style="color: black; font-weight: bold; text-decoration: \
underline;">shell/scripting/panel.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

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

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">PanelView *Panel::panel() const</pre></td>

  </tr>
 </tbody>



 
 

 <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">124</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">KConfigGroup</span> <span class="n">Panel</span><span \
class="o">::</span><span class="n">panelConfig</span><span class="p">()</span> <span \
class="k">const</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <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 \
think i would feel better if this was shared with panelview, to save possible very \
weird bugs (i wonder if it could be made static from panelview)</p></pre>  </div>
</div>
<br />



<p>- Marco Martin</p>


<br />
<p>On November 2nd, 2015, 4:26 p.m. UTC, David Edmundson 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 Plasma.</div>
<div>By David Edmundson.</div>


<p style="color: grey;"><i>Updated Nov. 2, 2015, 4:26 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-workspace
</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;">The basic design of Plasma is that scripts and and the \
shell (in theory) manipulate a tree of basic applet geometry and configs.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Plasmashell then reacts to those changes and displays \
them visually with a distinct separation between the layout and UI.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Panel's scriptengine seemed to do away with all, and \
try and manipulate the graphic object directly..which might not exist and that leads \
to complex code.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">This changes it to read/write from the \
same config object as PanelView will use. More akin to how the script engine for \
applet and contiainment work.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">If there's a view for \
this panel, we update immediately, otherwise it'll just get loaded when it's needed. \
PanelView::reload() has the error checking/bounds management so no point duplicating \
that.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Idea is to fix the same bug as \
https://git.reviewboard.kde.org/r/125920/ but also clean up a lot of the code which I \
thought had grown a bit complex. </p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Bit too big to backport \
though. Might be Plasma 5.6 material at this point.</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;">Modified my layout.js to set min, max sizes as well as \
alignment and offset which were previously broken.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Once \
loaded opened the interactive editor and run stuff like: panel = panelById(1);
panel.alignment = "center"
panel.height = 40</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Seems to work as before</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>shell/panelview.cpp <span style="color: \
grey">(2a80a65a9bbcaaad82a52e28525c73e816046a3d)</span></li>

 <li>shell/scripting/panel.h <span style="color: \
grey">(f7279100a7c79f2f15917b88d8199573a379cb7d)</span></li>

 <li>shell/scripting/panel.cpp <span style="color: \
grey">(bd78fc9b9dd95770126007777b2d41e3822e95ae)</span></li>

</ul>

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






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







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


--===============1043668603501070525==--


[Attachment #3 (text/plain)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


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

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