Roundup Tracker - Issues

Message7136

Author rouilj
Recipients rawler, richard, rouilj, schlatterbeck, stefan
Date 2021-03-23.21:25:27
Message-id <20210323212514.41DBA6A01DA@pe15.cs.umb.edu>
In-reply-to <20210323105412.nu5ohfxsxk35awp5@runtux.com>
Hi Ralf:

Responding to two updates here.

In message <20210323103411.z4l6lop3tqihfcp3@runtux.com>,
Ralf Schlatterbeck writes:
>On Mon, Mar 22, 2021 at 08:37:17PM +0000, John Rouillard wrote:
>> Ping was anything done with these patches? If not is anybody able to
>> update them to the current 2.0 code base and python3ize them with
>> tests?
>
>This is implemented with filter_iter a long time ago.
>
>But it isn't used in the html framework. 

What has to be done to get this implemented? I see that tests in
test/db_test_base.py do include calls to filter_iter.

Do we need a test for the templating system
(e.g. LinkHTMLProperty::menu())? The data in the database and schema
probably need to be set up to test the conditions:

   user is not allowed to see one of the items in the class
   one of the items in the class is retired

to make sure we hit the 3 main paths through the code. Final test is
to compare the html.  Then we can rework menu() to use filter_iter.

Question should the html be tested as a string or by comparing the two
parse trees. I think comparing by tree is more robust, but I don't
know of any tools in python to do that. Simple html parser, difflib etc.
don't quite fill the niche.

While I was looking at the code, we support xhtml and html4. At this
point I think xhtml is kind of dead, but we probably should maintain
it.  However should we add html5 to the output format? In most cases
html4 and html5 would be the same but .... If we do this should we
change the templates to html5 format (doctype declaration, lang=
attribute etc.).

Also I noticed that there is a checklist() spec commented out at the
end of the menu() definition. I see a reference to checklist in the
customizing.doc and in doc/html_extra/spec.html. Do you know if there
was ever an implementation for this (series of checkboxes to select
options (e.g. for search) or radiobuttons (with a none/unset value)
for setting the value for a Link)? Would have been nice to have as I
had to implement these at the templating level.

In message <20210323105412.nu5ohfxsxk35awp5@runtux.com>,
>On Tue, Mar 23, 2021 at 10:34:14AM +0000, Ralf Schlatterbeck wrote:
>> And: If the code in the loop uses Multilinks, these *are* fetched in
>> additional SQL queries (Multilinks are fetched lazily).
>
>This should be clarified: If the code in the loop accesses Multilinks
>properties of the node, those would be fetched separately. Which
>certainly does *not* happen in the original use-case of optimizing
>LinkHTMLProperty.menu and will not happen in many other use cases (like,
>e.g., fetching rows for display in index templates in the web interface
>in most cases I've seen).

To make sure I understand. If issue.index.html included the superseder
property, that would trigger this addition set of lookups (one per id
in the superseder list) correct?

Also if we use filter_iter we can't sort by multilink in the sql. Can
we detect if the user is requesting a multilink sort and fall back to
filter()? I think sorting by multilink might be a requirement for
index views when grouping by a multilink. (I agree with you that
sorting by multilink is confusing.)

Do you know if the multilink 1,9,10 has the same value as the
multilink 9,10,1? I think it must for sorting at the db level to make
any sense but ....

Have a great week.
History
Date User Action Args
2021-03-23 21:25:28rouiljsetrecipients: + rouilj, richard, schlatterbeck, stefan, rawler
2021-03-23 21:25:28rouiljlinkissue2550514 messages
2021-03-23 21:25:27rouiljcreate