These are chat archives for translate/dev

13th
Apr 2016
Julen Ruiz Aizpuru
@julen
Apr 13 2016 09:10
Hey everyone. FYI it seems like the IRC bridge is broken — yesterday I got no messages on IRC whatsoever
phlax
@phlax
Apr 13 2016 09:10
hi @julen - yep @jleclanche kindly provided it for us, but wasnt able to continue
he gave some pointers on setting up a bridge ourselves, but i wasnt entirely clear where to put it, and tbh i forgot about it
Leandro Regueiro
@unho
Apr 13 2016 09:17
@julen Hi, is there any way to retrieve a property from User model and expose it in https://github.com/translate/pootle/blob/master/pootle/static/js/shared/models/user.js#L18-L65 I mean other that creating a new view that returns the value of the property, and then call that view from this backbone model to get the actual value.
Julen Ruiz Aizpuru
@julen
Apr 13 2016 09:23
hi @unho, sorry I missed your message yesterday. Nope, there's no such way, although last time I checked django-rest-framework provided something along those lines; you might wanna check that. (Anyhow, I'd rather be away from Backbone altogether, as it'll be going away sooner than later)
Leandro Regueiro
@unho
Apr 13 2016 09:25
@julen The reason why I am asking about this is because I was looking for a way to fix translate/pootle#4123 My original idea was to add some property to User model and use it to display a warning on admin panel.
But given that it seems that there is no way to expose the properties I might have to look for another way to do this, for example adding and additional view. Despite I don't like this approach at all.
Julen Ruiz Aizpuru
@julen
Apr 13 2016 10:04
@unho as said, I'd suggest to check django-rest-framework's serializer implementation, AFAIK they are able to serialize properties as if they were DB fields
Julen Ruiz Aizpuru
@julen
Apr 13 2016 10:47
I've read the backlog re. django-comments and unless I've misread it, I'm missing where these comments are fitting in, i.e. in which context and to address which issue
phlax
@phlax
Apr 13 2016 11:02
hi @julen in this case we are adding comments on accept/reject suggestions, which will be shown in the timeline and hopefully other timelines in future
but i would like to move the comments that are currently in the Submission model out of there too fairly soon
Leandro Regueiro
@unho
Apr 13 2016 11:11
@phlax I am sorry, but where does the Submission model have a comment? https://github.com/translate/pootle/blob/master/pootle/apps/pootle_statistics/models.py#L166-L204
phlax
@phlax
Apr 13 2016 11:11
@unho i think one of the fields are being overloaded
Leandro Regueiro
@unho
Apr 13 2016 11:11
mmm, might be. That model is a mess.
Taras Semenenko
@ta2-1
Apr 13 2016 11:49
@julen, I'd like to check with you how we intend to work with forms in unit editor in future (if you have already thought about possible refactoring).
As you know for now we get ready html via xhr query.
Is it worth to try React for solving commenting on accept/reject according mockup I posted here before?
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:29
to clarify: Submissions are not directly related to commenting, they are a log of events which affected the unit over time (as if it was a higher level DB transaction log). Since at the moment commenting on units happens via a field (a bit tied to PO), these are recorded in the event log too, hence allowing to determine the current state of a unit by checking the timeline
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:35
TBH part of me thinks along the lines @ta2-1 was mentioning yesterday, i.e. a bit unsure on this extra hashes/requests thingie, taking into account that you need to give reviewer rights to a spammer first
phlax
@phlax
Apr 13 2016 15:36
as mentioned in this case it may not be necessary
but we are looking to use comments more widely, and to be able to query/show those comments in user timelines
review lists etc
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:37
do you have a reference I can check?
phlax
@phlax
Apr 13 2016 15:37
not especially atm
not really understanding the pushback tho
we need to add comments right now
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:37
which pushback?
phlax
@phlax
Apr 13 2016 15:37
this is a good solution
re django_comments
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:38
I'm just trying to inform what are your plans
phlax
@phlax
Apr 13 2016 15:38
broadly the things i would like to add are notifications and timelines
sure, there are some broad specs, but so much in terms of specifics at this stage
gotta run
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:41
@ta2-1 HTML via XHR worked fine in the past, however we've been moving away from that for a long while (a minor part of the editor remain as such), and fortunately better approaches to client-side UI development have flourished since then
Taras Semenenko
@ta2-1
Apr 13 2016 15:42
@julen I've tried SuggestionFeedbackForm component )
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:42
@ta2-1 which one is that?
Taras Semenenko
@ta2-1
Apr 13 2016 15:43
a new one
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:44
Cool. As mentioned the other day, there might be some overlapping with translate/pootle#4171; worth to be aware of that
Taras Semenenko
@ta2-1
Apr 13 2016 15:47
Igor's mockup assumes that we put editor to suggestion area. TBH I haven't looked how to address this. If overlapping is critical we can address altering of suggestion later.
And put simple feedback (comment) form to suggestion area only
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:52
@ta2-1 that'd be a matter of rendering a EditorTextarea component https://github.com/julen/pootle/blob/issue/3941/pootle/static/js/editor/components/EditorTextarea.js
Taras Semenenko
@ta2-1
Apr 13 2016 15:52
wow)
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:54
I admit there are some ugly hacks there though, as it's only aimed to replace the current editing textarea, not the whole widget, therefore state cannot be kept in a single place (sometimes it still relies on the DOM)
Taras Semenenko
@ta2-1
Apr 13 2016 15:54
have you addressed anything related to suggestion model?
Julen Ruiz Aizpuru
@julen
Apr 13 2016 15:54
that's only addressing the editing textarea
Igor Afanasyev
@iafan
Apr 13 2016 15:58
@julen the mockup @ta2-1 currently has is almost final. If that would be possible technically, I would like to see the full editor inside the comment (with special characters, raw mode, plurals preview widget).
Julen Ruiz Aizpuru
@julen
Apr 13 2016 16:13
@iafan that really depends on timing I guess — note the new escaping/highlighting code is not 100% ready, and I still have to resume work on it
Taras Semenenko
@ta2-1
Apr 13 2016 16:33
@iafan we are not going to implement rating system atm
Igor Afanasyev
@iafan
Apr 13 2016 16:34
@julen just wanted to say that we could implement a really good UI if we had an opportunity to reuse the entire editor in the context of the suggestion review UI
@ta2-1 ok, noted. The free-form comment field will still be there, I suppose?
Taras Semenenko
@ta2-1
Apr 13 2016 16:36
haha) we don't consider empty form.
@iafan just wanted to say that we discussed with @dwaynebailey what we have to do with the main editor while we put it to suggestion review UI.
will we be able to disable it if all features are available in suggestion editor?
Igor Afanasyev
@iafan
Apr 13 2016 16:44
@ta2-1 yes, that's basically my idea, which I yet have to provide mockups for. If one expands a suggestion to work with it, we can basically "collapse" (disable / somehow render differently) the main editor and display the same fully functional editor in the context of the expanded suggestion