Skip to content

Commit 8054e17

Browse files
committed
chore: Issue 2333 - Updated EBI Header Footer component for optimised approach
1 parent 78133e2 commit 8054e17

7 files changed

Lines changed: 5217 additions & 12 deletions

File tree

components/ebi-header-footer/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### 2.1.4
2+
3+
* Optimised the component by removing dependency of old header (with VF 1.4) and footer loading from contenthub. [Tracking issue](https://github.com/visual-framework/vf-core/issues/2333)
4+
15
### 2.1.3
26

37
* Resolve accessbility issues for EBI blackbar header for v1.4 and also fixes overlapping x button for search box.

components/ebi-header-footer/README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@
44

55
## About
66

7-
Support for using the EMBL-EBI header and footer from the EMBL-EBI VF 1.3.
7+
Support for using the EMBL-EBI header and footer in projects that use the Visual Framework 2.0.
8+
9+
> **Upgrade recommended:** If you are using an earlier version of this component, upgrade to **v2.1.4 or later**. Previous versions loaded header and footer HTML from the EMBL ContentHub and depended on the legacy `EBI-Framework/v1.x/script.js` file. Both of those external dependencies have been removed as of v2.1.4.
10+
11+
## What changed in v2.1.4
12+
13+
- **Removed ContentHub HTML loading dependency.** The header and footer HTML is now self-contained in the component templates (`ebi-header-footer--header.njk` and `ebi-header-footer--footer.njk`). No `<link rel="import">` or `data-embl-js-content-hub-loader` attribute is needed.
14+
- **Removed legacy `script.js` dependency.** The component no longer relies on `//ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.x/js/script.js` to bootstrap header or footer behaviour. All required JavaScript (black bar population, global search, data protection banner, external link decorators, announcements) is fully bundled inside `ebi-header-footer.js`.
15+
- **Lighter and faster.** Eliminating two external round-trips (ContentHub API call + legacy script) reduces page load overhead and removes a network failure point.
16+
- **No functional or visual regressions.** The rendered output and interactive behaviour remain identical to previous versions.
817

918
## Usage
1019

11-
This component provides the minimum amount of legacy CSS to make the header and footer work while avoiding conflicts with other 2.0 styles.
20+
This component provides the minimum amount of legacy CSS to make the header and footer work while avoiding conflicts with VF 2.0 styles.
1221

13-
- This component requires the EMBL contentHub loader, which is included in most EMBL VF builds.
1422
- This requires VF 2.0 footer CSS and other styles.
1523
- If you do not currently have VF 2.0 CSS and JS as part of your project, [you can use the CDN JS](https://stable.visual-framework.dev/#cdn).
16-
- This uses the existing `//ebi.emblstatic.net/web_guidelines/EBI-Framework/v1.3/js/script.js` to load the HTML for the header.
17-
- The EBI VF 1.x will also included a data protection banner, to disable this with 1.4 you can an included an element with `data-protection-message-disable="true"`
18-
- This will be inserted by default when using the `ebi-header-footer--footer` template.
24+
- The EMBL contentHub loader is **no longer required** as of v2.1.4.
25+
- The legacy `script.js` file from EBI-Framework v1.x is **no longer required** as of v2.1.4.
26+
- The data protection banner is bundled inside the component JS. To disable the built-in VF 1.x cookie banner include an element with `data-protection-message-disable="true"`.
27+
- This is inserted automatically when using the `ebi-header-footer--footer` template.
1928

2029
## Install
2130

0 commit comments

Comments
 (0)