Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects

OEL-1919: Fix broken styling for facetapi.

Merged Francesco SARDARA requested to merge OEL-1919 into 1.x

Created by: drishu

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
7 7 // Component
8 8 // -----------------------------------------------------------------------------
9 9 @import "components/my.component";
  • Francesco SARDARA
  • Francesco SARDARA
  • Francesco SARDARA
    Francesco SARDARA @brummbar started a thread on commit 03403002
  • 65 ],
    66 ],
    67 ])->save();
    68
    69 $block = $this->placeBlock('facets_summary_block:owl', ['region' => 'content']);
    70 $this->drupalGet('search-api-test-fulltext');
    71
    72 $assert = $this->assertSession();
    73 $assert->elementTextContains('css', 'main h4', $block->label());
    74 $assert->elementTextContains('css', 'span.source-summary-count', '(5)');
    75 }
    76
    77 /**
    78 * Tests facets block rendering.
    79 */
    80 public function testFacetBlock(): void {
  • Francesco SARDARA
  • Francesco SARDARA
    Francesco SARDARA @brummbar started a thread on commit 03403002
  • 1 {#
    2 /**
    3 * @file
    4 * Override facets item lists, alter title, inject classes.
    5 */
    6 #}
    7 <div class="facets-widget- {{- facet.widget.type -}} ">
    8 {% if facet.widget.type -%}
    9 {%- set attributes = attributes.addClass('item-list__' ~ facet.widget.type) %}
    10 {%- endif %}
    11 {% if facet.widget.type == 'dropdown' -%}
    12 {%- set attributes = attributes.addClass('form-select') %}
    13 {%- endif %}
    • Created by: brummbar

      Not sure if we should do this here or in a preprocess. Probably better in a preprocess. In any case, let's add some blocks around to ease overrides from users.

    • Created by: brummbar

      Since we already have a check inherited from the parent regarding dropdown, it's ok to keep it here. But let's add blocks.

  • Created by: brummbar

    Review: Changes requested

    image I see there is some spacing issue still. Ignore the date range, we don't support it yet (not in this ticket anyway)

  • Francesco SARDARA
    Francesco SARDARA @brummbar started a thread on commit a6605ae1
  • 1 .facets-widget-checkbox .item-list__checkbox,
    2 .facets-widget-links .item-list__links,
    3 .facets-widget-date_range .item-list__date_range {
    • Created by: drishu

      this is the only thing I had to touch to style this date range widget, so as long as we dont have visual regression there is no point in adding the module to composer or tests

  • Created by: brummbar

    Review: Approved

  • Merged by: brummbar at 2022-08-22 15:49:04 UTC

  • merged manually

  • Please register or sign in to reply
    Loading