<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 07/14/2017 02:24 AM, dr. Sybren A. Stüvel wrote:<br>
    <blockquote type="cite"
      cite="mid:586f0000-d531-f11d-efca-aededc18f332@blender.studio">
      <pre wrap="">Hi Ellwood,

On 14/07/17 10:42, Ellwood Zwovic wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Today I added repository fetching and a simple package browser interface.
</pre>
      </blockquote>
      <pre wrap="">
Let me copy-paste my response from two days ago:

If you have spent 8+ hours on this there must be more to tell about it
than a single sentence. What exactly have you done? What are you proud
of you got in there? What did you struggle with? In what way is it
different from what we had before?</pre>
    </blockquote>
    I added a panel to the "Packages" section of the user preferences
    (added in my branch). Currently the packages section coexists with
    the addons section, but my plan is to be able to do just about
    everything the addons section does from the packages section (so
    eventually they will be merged).<br>
    I'm pretty happy with the way the interface design is working out so
    far. I'd be interested hearing in any feedback from the UI team,
    though it might be still a little early for that yet.<br>
    <blockquote type="cite"
      cite="mid:586f0000-d531-f11d-efca-aededc18f332@blender.studio">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">Some questions:

I tried to find a way to have the packagelist be scroll-able 
independently from the options on the side. Is there a way to allow, 
say, a box to have its own scrollbar? The only element I found which 
seems to come with a scrollbar is a UIlist. I haven't tried it yet, but 
it doesn't quite seem appropriate (all the
</pre>
      </blockquote>
      <pre wrap="">
I wouldn't know about this directly off-hand, maybe someone else on the
list can chime in? It feels like you're trying to create a scrolling box
inside a scrolling box, which is generally a bad idea.</pre>
    </blockquote>
    If both the "sidebar" and the packagelist are in their own
    scroll-box, there will be no need for an outer scrollbar. So no
    nesting of scrollbars, just parallel scrollbars. See for example how
    the <a moz-do-not-send="true"
href="https://docs.blender.org/manual/en/dev/modeling/meshes/introduction.html#properties-region">documentation</a>
    scrolls (though this is not a perfect example, as the docs have an
    IMO-strange scroll-linking behavior).<br>
    <br>
    Perhaps I could put the sidebar in a toolshelf-style region?<br>
    <blockquote type="cite"
      cite="mid:586f0000-d531-f11d-efca-aededc18f332@blender.studio">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">I also noticed that the panel draw method is being called on scroll 
events; seemingly causing degraded performance (in fact, I noticed this 
with the current addon browser too). I can certainly do some things to 
optimize the draw method, but I'm curious if there's a short explanation 
of why this is. Is there actually a way for python to pick up on scroll 
events and modify things meaningfully?
</pre>
      </blockquote>
      <pre wrap="">
As said before: focus on getting it working first. We can always
optimise later.</pre>
    </blockquote>
    Hence why I haven't started optimizing already. I'm merely curious
    what the reason for this behavior is. Is draw() actually called
    every redraw? Does the layout really need to be re-calculated every
    redraw (including redraws due to scrolling)? How easy would it
    be/how much stuff would break if draw() wasn't called on scroll?
    Would that give a free performance boost to the UI everywhere? Or,
    more likely, am I just missing something here?<br>
    This isn't a pertinent issue to the basic functionality of the
    package manager, it's just a general question.<br>
    <blockquote type="cite"
      cite="mid:586f0000-d531-f11d-efca-aededc18f332@blender.studio">
      <pre wrap="">

</pre>
      <blockquote type="cite">
        <pre wrap="">On a rather unrelated note, how strict are the requirements for the 
bl_info dict? I've been thinking it would be nice to have a changelog 
url.
</pre>
      </blockquote>
      <pre wrap="">
Again, focus on getting the package manager working first, and don't
spend time doing extra things on the side.

</pre>
      <blockquote type="cite">
        <pre wrap="">Plans for tomorrow: clean up repository (I didn't get to it today),
</pre>
      </blockquote>
      <pre wrap="">
The repository is very small, so cleanup wouldn't take long. What were
your reasons to not do this today as you said you would?</pre>
    </blockquote>
    I ended up regularly using my old code for reference, and having it
    so nearby was quite handy.<br>
    I'll move it to a non-git directory and get the best of both worlds.<br>
    <blockquote type="cite"
      cite="mid:586f0000-d531-f11d-efca-aededc18f332@blender.studio">
      <pre wrap="">


When I try to serve the generated repo.json file via "python3 -m
http.server", use <a class="moz-txt-link-rfc2396E" href="http://localhost:8000/">"http://localhost:8000/"</a> as URL, and click the Refresh
button, I get this error:</pre>
    </blockquote>
    Ah, it currently expects the exact URL to the repo.json, so that
    should be  <a class="moz-txt-link-rfc2396E" href="http://localhost:8000/repo.json">"http://localhost:8000/repo.json"</a>. The reason for the
    json error seems to be that python returns a listing (in html) when
    given the URL of a directory.<br>
    <br>
    However, part of the reason for choosing a fixed name for the
    repo.json file is so that it wouldn't need to be specified all the
    time. I'll see about adding that (and generally adding proper error
    handling to the refresh function) today.<br>
    <blockquote type="cite"
      cite="mid:586f0000-d531-f11d-efca-aededc18f332@blender.studio">
      <pre wrap="">

2017-07-14 11:19:30,200     INFO bpkg_manager.BPKG_OT_refresh Starting
2017-07-14 11:19:30,214  WARNING bpkg_manager.subproc.refresh Failed to
read existing repository: . Continuing download.
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in
_bootstrap
    self.run()
  File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File
"/home/sybren/.config/blender/2.78/scripts/addons/bpkg_manager/subproc.py",
line 500, in refresh
    repo.refresh()
  File
"/home/sybren/.config/blender/2.78/scripts/addons/bpkg_manager/subproc.py",
line 225, in refresh
    repodict = resp.json()
  File
"/home/sybren/.local/lib/python3.5/site-packages/requests/models.py",
line 826, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2017-07-14 11:19:30,313    ERROR bpkg_manager.BPKG_OT_refresh Process
died without telling us! Exit code was 1


</pre>
    </blockquote>
    <br>
  </body>
</html>