BigW Consortium Gitlab

  1. 01 Jun, 2016 1 commit
    • Refactor Participable · 580d2501
      Yorick Peterse authored
      There are several changes to this module:
      
      1. The use of an explicit stack in Participable#participants
      2. Proc behaviour has been changed
      3. Batch permissions checking
      
      == Explicit Stack
      
      Participable#participants no longer uses recursion to process "self" and
      all child objects, instead it uses an Array and processes objects in
      breadth-first order. This allows us to for example create a single
      Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
      a ReferenceExtractor removes the need for running potentially many SQL
      queries every time a Proc is called on a new object.
      
      == Proc Behaviour Changed
      
      Previously a Proc in Participable was expected to return an Array of
      User instances. This has been changed and instead it's now expected that
      a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
      value of the Proc is ignored.
      
      == Permissions Checking
      
      The method Participable#participants uses
      Ability.users_that_can_read_project to check if the returned users have
      access to the project of "self" _without_ running multiple SQL queries
      for every user.
  2. 26 May, 2016 8 commits
    • Refactor Mentionable · 35e977d6
      Yorick Peterse authored
      Caching is now always enabled when rendering attributes as there's no
      reason to not cache them. The method Mentionable#all_references has also
      been modified to take an optional Gitlab::ReferenceExtractor instance to
      allow other code to create one and re-use it between multiple calls.
    • Added author to various Markdown calls in views · 25c08d11
      Yorick Peterse authored
      This ensures all these calls have an author set, allowing the use of
      "all" mentions where possible.
    • Split Markdown rendering & reference gathering · 86166d28
      Yorick Peterse authored
      This splits the Markdown rendering and reference extraction phases into
      two distinct code bases. The reference extraction phase no longer relies
      on the html-pipeline Gem (and any related code) and allows for
      extracting of references from multiple HTML nodes in a single pass. This
      means that if you want to extract user references from 200 comments you
      no longer need to run 200 times N number of queries, instead only a
      handful of queries may be needed.
    • Added Gitlab::Lazy · 94d5416d
      Yorick Peterse authored
      This class can be used to lazy-evaluate blocks of code the first time
      they're called. This can be useful when a method performs a certain
      heavy operation (e.g. a SQL query) that you only want to perform
      whenever the result is used for the first time.
    • Don't modify arguments in CommitRange#initialize · 309ca405
      Yorick Peterse authored
      This method used to call strip! on input strings which will mess with
      the strings if they're re-used or frozen.
    • Merge branch 'sidebar-expand-collapse' into 'master' · f2caad24
      Jacob Schatz authored
      Fix right sidebar expand/collapse issue
      
      Fixed branch name of the !4117
      
      
      ------------------
      
      Fixes #15643 
      
      - Fixed a typo in `toggleSidebar` method of `Sidebar` class.
      - Fixed a minor styling issue to fix the sidebar to the top of the page.
      - Added tests for Sidebar.
      
      
      ## Before
      ![before](/uploads/c4efe9a64e0ae35f423302753caa6dfd/sFBwnVEpQB.gif)
      
      ## After
      ![after](/uploads/23e6b80888dae475a385912c8c40bdbd/rerKiYC4dk.gif)
      
      
      See merge request !4292
  3. 25 May, 2016 31 commits