Commit graph

18 commits

Author SHA1 Message Date
Marta Bondyra
65bdf1ff8e
Optimize existing image assets with lossless compression (#223998)
## Summary

This PR applies **lossless compression** to all SVG and JPG/PNG assets
across Kibana using:

- [`svgo`](https://github.com/svg/svgo) — for optimizing SVGs  
- [`image-optimize`](https://www.npmjs.com/package/image-optimize) — for
JPG/PNG compression

‼️**Please scroll to ''Unknown metric groups" accordion to see what's
the gain for your code.**
<img width="542" alt="Screenshot 2025-06-18 at 13 24 20"
src="https://github.com/user-attachments/assets/191afb28-44fc-4551-9026-756a8385c66a"
/>

The goal is to reduce asset size and improve load performance without
compromising visual quality.

This PR achieves a **23 MB** reduction in asset size across all images
bundled in Kibana’s running code—meaning these compressed images
directly impact what ships in Kibana.
Some assets get bundled into chunks due to our bundling strategy but
might not actually be requested at runtime.

Additionally, I ran the same optimization script on the docs assets as a
harmless extra step, but those savings aren’t included in the 23 MB
total.

---

## Why

While working on Emotion rewrites, I noticed some SVGs seemed
unnecessarily heavy. That led to a broader investigation into our image
assets, and it turns out we’re not consistently optimizing them during
development or build.


---

## Notes

- Visual fidelity of optimized assets has been manually verified — no
visible differences
- The optimization is **lossless**, meaning no quality degradation
- Some assets (like large background images) could benefit further from
**lossy compression**

---

## Follow-ups / Ideas

1. **Automate compression in the dev/build pipeline**
   - e.g. add `svgo` as a pre-commit or CI step for SVGs
2. **Improve CI reporting**  
- Currently, bundle size diffs for images are hidden under "Unknown
metric groups" in the GitHub CI comment. We may want to make these more
visible.
   - 
3. **Audit large assets manually** — apply lossy compression where
appropriate
4. **Avoid redundant image loading**  
- e.g. background images on the login page are loaded again on the space
selector page since they’re bundled twice. I’m working on a separate PR
to address that.

## Snippets I used to apply the compression

```
# Find SVG files
find . -type f -iname "*.svg" \
  -not -path "*/node_modules/*" \
  -not -path "*/functional/*" > svg-files.txt

# Compress SVGs
while IFS= read -r file; do
  svgo "$file"
done < svg-files.txt
```

This snippet has been used for png and jpg, but the example below is for
png:
```
# Find PNG files
find . -type f -iname "*.png \
  -not -path "*/node_modules/*" \
  -not -path "*/functional/*" > png-files.txt

# Compress PNGs
while IFS= read -r file; do
  image-optimize -f jpg "$file"
done < png-files.txt
```
2025-06-19 16:44:13 +02:00
Sid
de0e1eb0d4
Developer documentation for designing feature privileges (#166716)
## Summary

Closes #162263

Introduces a new `Feature Privileges` section to the developer
documentation. The documentation includes a tutorial on how to control
access to features of plugin being developed. Introduces a few sections:

- Controlling access to UI features
- Controlling access to server side APIs
- Documentation for configuration options

## Testing
To build this locally, run ./scripts/dev_docs from a local checkout of
this PR. A server will eventually start on http://localhost:3000 where
you can preview the changes.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-27 13:43:55 +02:00
Maja Grubic
cbcab1b675
[DevDocs] Update kibana_template_no_data_config image (#129641) 2022-04-07 07:48:36 +02:00
Pierre Gayvallet
855d2f1094
Migrate routing and navigation docs to new developer guide (#113919)
* Migrate routing and navigation doc to new doc system

* address feedback
2021-10-07 12:45:15 +02:00
Stacey Gammon
cc00f3f279
Update kibana plugin, platform and package overview doc (#112894)
* udpate

* Update kibana_platform_plugin_intro.mdx

* Update kibana_platform_plugin_intro.mdx

* Update kibana_platform_plugin_intro.mdx

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-05 10:02:46 -04:00
Caroline Horn
59ec89bfbe
[NoDataPage] Updating the default messages (#108799)
* [NoDataPage] Updating the default messages and reusing `title` as default `button` label
  * Update default description for agent
* Overview page i18n and snaps
2021-08-17 17:59:15 -04:00
Matthew Kime
2e68ce1a05
Developer guide - index patterns key concepts (#96017)
* add index patterns key concepts
2021-08-15 08:48:51 -05:00
Caroline Horn
ba14713623
[KibanaPageTemplate] Adding a noDataConfig for templated add data screens (#108293) 2021-08-12 20:01:54 -04:00
Brian Seeders
194a8a87a8
[Docs] Add a tutorial for how to open a pull request (#103697) 2021-07-06 14:35:00 -04:00
Caroline Horn
bca1c14f9c
[KibanaPageLayout] Solution Nav specific styles & props (#100089)
* Fixing sticky nav
* Adding some side bar styles
* Added a built-in solution nav title with avatar icon
* Adding tutorial docs
* Added KibanaPageTemplateSolutionNavAvatar
* Added KibanaPageTemplateSolutionNav
* Increased limit to `core` / `kibanaReact` plugin because of additional CSS
2021-05-25 13:28:05 -04:00
Tiago Costa
ebf77da99b
[dev_docs] How to build a kibana distributable tutorial (#99827)
* docs(NA): [dev docs] Add how to build a Kibana distributable tutorial

* docs(NA): including last step about building a kibana distributable tutorial

* docs(NA): add dev docs images

* docs(NA): include image for target folder with os packages and distributable

* docs(NA): apply feedback received on the PR review

* chore(NA): add rpm to brew

* chore(NA): update dev_docs/tutorials/building_a_kibana_distributable.mdx

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>

* chore(NA): update dev_docs/tutorials/building_a_kibana_distributable.mdx

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>

* docs(NA): update docker names to capitalized

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-24 16:02:08 +01:00
Jonathan Budzenski
e476029daa
[dev docs] Add sample data tutorial. Closes #98297 (#99252)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-18 18:35:01 -04:00
Michail Yasonik
921c942bef
Unifying converting listing pages to new layout (#98651)
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-06 18:31:20 -04:00
Stacey Gammon
5d59c2c8e1
Add section on developer documentation into best practices docs (#95473)
* add section on dev docs to best pratices.

* Update best_practices.mdx

* Update dev_docs/best_practices.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
2021-03-25 18:52:07 -04:00
Stacey Gammon
1fc50005cc
Create best practices doc in developer guide (#94981)
* Create best_practies.mdx

* Update best_practices.mdx

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-23 18:54:03 -04:00
Stacey Gammon
9fca7a9012
Add saved object docs (#90860)
* iwp

* add docs on saved objects

* add saved object docs

* Update dev_docs/key_concepts/saved_objects.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update dev_docs/tutorials/saved_objects.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update dev_docs/tutorials/saved_objects.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update dev_docs/tutorials/saved_objects.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update dev_docs/tutorials/saved_objects.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update dev_docs/tutorials/saved_objects.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update dev_docs/tutorials/saved_objects.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* review updates

* remove this line, support being added

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
2021-02-11 11:27:46 -05:00
Stacey Gammon
10adb72ddb
Plugin introduction doc improvements (#90502)
* More plugin docs improvements

* remove speculation about the future

* remove registries section

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-09 16:27:36 -05:00
Stacey Gammon
58c54b6f85
Add a high level overview of the Kibana platform and plugin development. (#87560)
* add platform intro

* address code review comments (wip)

* incorporate more information about plugins

* put back Josh's suggestion

* Update dev_docs/kibana_platform_plugin_intro.mdx

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* try another angle

* further refinements

* sp

* Update kibana_platform_plugin_intro.mdx

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
2021-01-22 09:02:42 -05:00