Skip to content

Improve manifest.json to dynamicly add values

Summary

We now have a manifest.json (rendered through https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/pwa/manifest.json.erb) and are one step closer to the PWA, great!

In our opinion, the manifest.json could be improved by using the instance settings instead of hard-coded values.

Improvements

Lets create pwa attributes in appearance. Those attributes can be set via api or gui. The attributes are loaded into the manifest.json

Attributes:

  • pwa_name used for manifest.json field name
  • pwa_short_name used for manifest.json field short_name
  • pwa_description used for manifest.json field description
  • pwa_icon used for manifest.json field icons (array with icon in different sizes)

For this we need:

  • add attributes to appearance (database / model)
  • Make them accessible via api or gui (controller)
  • render icon in different sizes
  • Update Appearance GUI with the new attributes

Risks

None that I know of

Involved components

  • manifest.json
  • Admin > Appearance page
  • Appearance controller
  • Appearance API

🛠 with at Siemens

Edited by Andreas Deicha