1. 22 Aug, 2019 1 commit
  2. 29 Apr, 2019 1 commit
    • Hugo Lefeuvre's avatar
      i18n: make chatview translatable · 7e29ea17
      Hugo Lefeuvre authored
      This patch implements i18n support in the chatview using Jed.
      
      + gettext style API, transparent for translators.
      + extract string using xgettext, translate po as usual.
      + convert po files to JSON using po2json.
        This has to be done once, by the Jenkins automatic i18n bump for
        instance. The build-chatview-locales script can be used to
        automate the .po -> .json convertion process.
      + po2json generated files are shipped as gresource and loaded into the
        chatview by webkitchatcontainer.
      
      Gitlab: #900
      Change-Id: Iaf925e2fd37174fff0b6139fc0019bda91938ace
      Reviewed-by: Sébastien Blin's avatarSébastien Blin <sebastien.blin@savoirfairelinux.com>
      7e29ea17
  3. 14 Jan, 2019 1 commit
  4. 26 Dec, 2018 1 commit
  5. 14 Dec, 2018 1 commit
  6. 05 Dec, 2018 2 commits
  7. 29 Nov, 2018 1 commit
    • Hugo Lefeuvre's avatar
      refresh popupmenu/chatview on account state change · 7e259ac4
      Hugo Lefeuvre authored
      Better UI reactivity on account state change:
      
      + Do not show audio and video call options in the conversationsview's
        popup menu when account is disabled (this doesn't make sense,
        account is not able to place a call)
      + Refresh popup menu on account state change (list of options
        has to be updated)
      + Refresh chatview on account state change (some elements of the
        chatview require update, e.g. message bar)
      + Fix broken display property update in hideControls()
      
      Misc code cleanup, add a few helpers to avoid code duplication.
      
      Change-Id: I212a47566bd65687e5ed61ec56087a4e1f3166bd
      Gitlab: #929Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      7e259ac4
  8. 20 Sep, 2018 1 commit
    • Hugo Lefeuvre's avatar
      chatview: fix attempt to assign ro property · 19363ba0
      Hugo Lefeuvre authored
      "Styles should not be set by assigning a string directly to the style
      property since it is considered ro, as the style attribute returns a
      CSSStyleDeclaration object which is also read-only."
      
      Fix attempts to assign style property.
      
      Change-Id: Idffa1be0e9bbe654eeb40a73f2d89a8b02fa9abf
      19363ba0
  9. 13 Jul, 2018 1 commit
  10. 12 Jul, 2018 1 commit
    • Hugo Lefeuvre's avatar
      chatview: fix multiple perfs/style related issues · 61cd0798
      Hugo Lefeuvre authored
      - fix timestamp efficiency issue.
      - fix message bar size which was blocked at bigger size when using
        send button instead of return key.
      - fix invitation text selection.
      - fix bad handling of broken images / paths.
      - fix navbar present during call because of WebKit crashes.
      - fix ghost navbar during call.
      - fix buggy ellipsis due to duplicate ids.
      - fix duplicate retry in file transfer ellipsis.
      - fix bug where ellipsis was placed at the right side of newly uploaded
        images.
      - fix various issues in removeInteraction.
      - fix wrapping issues in navbar.
      
      Change-Id: If2f67090c889c1b0efaf21d6f00c72471752b9f8
      Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      Gitlab: #833
      Gitlab: #838
      Gitlab: #839
      Gitlab: #843
      Gitlab: #845
      Gitlab: #849
      Gitlab: #861
      Gitlab: #862
      61cd0798
  11. 06 Jul, 2018 1 commit
  12. 05 Jul, 2018 1 commit
    • Hugo Lefeuvre's avatar
      chatview: remove loading animations · f9bb72ba
      Hugo Lefeuvre authored
      Animations during conversation loading are heavy and useless. Remove
      them. Also remove animations of message status (sending ... and X when
      message failed to send) as they are pretty useless and look weird with
      lazy loading.
      
      Add a ... icon at the top of the conversation to make it more
      intuitive to the user that he can scroll further when a conversation
      was lazy loaded.
      
      Add a workaround to stop creating #messages dynamically.
      
      Change-Id: If6183bd58002eb79d459dad5dd3c0b55eecebf86
      Gitlab: #836Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      f9bb72ba
  13. 29 Jun, 2018 2 commits
    • Hugo Lefeuvre's avatar
      chatview: implement lazy display · b82bbca8
      Hugo Lefeuvre authored
      Messages are now displayed block by block. When the user reaches the
      top of the scrollbar, a new batch of messages gets loaded.
      
      This allows better performances on large conversations.
      
      Change-Id: Idc44df7149db6329982b2aa3420de6c014ce0924
      Gitlab: #811Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      b82bbca8
    • Hugo Lefeuvre's avatar
      chatview: load all messages at once in the DOM · 0babe2b4
      Hugo Lefeuvre authored
      Currently messages are appended one by one to the DOM. This is very
      inefficient in the case where conversations have a reasonable size.
      Since we're going to implement lazy loading in a further commit it
      is a good idea to load everything at once in the DOM.
      
      - During initial load: Generate #messages and THEN load it in the DOM
      - Fix scrolling issues using onload callback after images get loaded
      - Remove useless exec_keeping_scroll_position calls
      - Fix padding issue at the bottom. This is a WebKit bug so we use a
        workaround: dynamically add a small padding to the last element in
        the chatview.
      
      This commit is the first step towards lazy loading in the chatview.
      
      Change-Id: I329a11615b846ab0b198af38f529ed0de8a3ac18
      Gitlab: #825
      Gitlab: #834Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      0babe2b4
  14. 06 Jun, 2018 2 commits
  15. 05 Jun, 2018 1 commit
  16. 01 Jun, 2018 1 commit
    • Hugo Lefeuvre's avatar
      chatview: major cleanup · 368c47c5
      Hugo Lefeuvre authored
      Despite of the recent optimization commits, the chatview is still
      affected by a significant number of performance issues. This commit
      tries to address some of them:
      
      * Use getElementById instead of querySelector, when possible.
      * Use getElementByClassName instead of querySelector, when possible.
      
      (querySelector is in average 2x slower than getElementById or
      getElementByClassName!)
      
      In this commit we also address the following bugs:
      
      * printHistoryPart: it doesn't make any sense to call
        addOrUpdateMessage if we are at the end of the buffer.
      * the bottom padding of the body isn't updated with the size of
        the #message textarea, leading to an annoying overlap when writing
        large messages.
      * selection highlighting in the chatview is crappy. The user should
        not be able to highlight the background because it doesn't make
        any sense. Only meaningful elements should be highlightable.
      * The first time a message fails to be sent, the cross 'X' icon
        is displayed with a very bad looking shift to the right. This is
        because the 'sending' icon is still displayed, with visibility
        hidden.
      * Many variables were not declared / using some broken, ancient
        JavaScript Sith magic we don't want to mess with. In order to make
        sure we are not going to rely on such mechanisms anymore, add
        "use strict" stanza.
      
      In addition to that we also fix a _very_ large number of style issues
      (semicolons, indentation, comments) and define a clear style policy
      for the JS code.
      
      A code audit revealed several small bugs which we are not going to
      address in this commit. Add FIXME comments.
      
      Also, remove some useless debug warnings from the GTK side chatview
      code.
      
      Change-Id: If6b605868ba6b0b9623ae01c5293064211b58327
      Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      368c47c5
  17. 30 May, 2018 1 commit
    • Hugo Lefeuvre's avatar
      chatview: implement navbar · edad8832
      Hugo Lefeuvre authored
      Currently the navbar is implemented in native GTK, and has a pretty
      bad integration with the chatview. In this patch we implement a
      modern navbar *in* the chatview and remove the old GTK bar.
      
      *Changes summary*
      
      chatview, HTML/JS/CSS side:
      - Remove useless function setSendIcon from the chatview
      - Simplify setTemporary in the chatview
      - Use only one single showInvitation function instead of two
        showInvitation and hideInvitation functions.
      - Remove pointless/copy&pasted comments
      
      chatview, GTK side:
      - Simplify chatview update methods: instead of providing several
      separate functions to update the invitation/banned status of the chat
      view, only provide one (update_chatview_frame). This should have a
      good impact on the performances and simplify webkit crash handling.
      
      Change-Id: I6959240efd357fedb07d3c60d551efc8fca84812
      Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      edad8832
  18. 29 May, 2018 1 commit
  19. 28 May, 2018 1 commit
    • Hugo Lefeuvre's avatar
      chatview js/html: cleanup and optimization work · 65a41d6d
      Hugo Lefeuvre authored
      Major cleanup and optimization work in the chatview (html/js part):
      - use getElementById instead of querySelector when possible. This is
        3x quicker in average!
      - get rid of the useless ring.chatview namespace. This makes the
        chatview code way more readable.
      - get rid of the test code. This has nothing to do in production.
      - store the result of getElementById calls as global variables. These
        calls are very expensive and calling them each time we execute a
        function is pure nonsense.
      - do not call printHistoryPart when buffer is 0
      
      Change-Id: I76d39a8632f069ecd3d659f4938bffff7a10a71b
      Reviewed-by: Sébastien Blin's avatarSebastien Blin <sebastien.blin@savoirfairelinux.com>
      65a41d6d
  20. 07 May, 2018 3 commits
  21. 04 May, 2018 2 commits
  22. 13 Apr, 2018 1 commit
  23. 29 Mar, 2018 1 commit
  24. 01 Mar, 2018 1 commit
  25. 26 Feb, 2018 1 commit
  26. 21 Feb, 2018 1 commit
  27. 02 Nov, 2017 1 commit
  28. 16 Oct, 2017 1 commit
  29. 04 Aug, 2017 1 commit
  30. 01 Aug, 2017 1 commit
  31. 31 Jul, 2017 2 commits
  32. 14 Jul, 2017 2 commits