Follow-up from "Draw a divider above analytics dashboard section headings"

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussion from !254441 (merged) should be addressed:

  • @adruid started a discussion:

    suggestion (non-blocking):

    Can we pin the tiling in system_dashboards_loader_spec.rb, so a future row trim cannot quietly overlap two panels

    it 'tiles every shipped dashboard without overlapping panels' do
      described_class.all.each do |dashboard|
        groups = dashboard.config['views']&.map { |view| view['panels'] } || [dashboard.config['panels']]
    
        groups.each do |panels|
          occupied = Set.new
    
          panels.to_a.each do |panel|
            grid = panel['gridAttributes']
            rows = grid['yPos']...(grid['yPos'] + grid['height'])
            cols = grid.fetch('xPos', 0)...(grid.fetch('xPos', 0) + grid.fetch('width', 12))
    
            rows.each { |row| cols.each { |col| expect(occupied.add?([row, col])).to be_truthy } }
          end
        end
      end
    end
Edited by 🤖 GitLab Bot 🤖