Git Product home page Git Product logo

volto-eea-kitkat's Introduction

volto-eea-kitkat ๐Ÿซ

Releases

Pipeline Lines of Code Coverage Bugs Duplicated Lines (%)

Pipeline Lines of Code Coverage Bugs Duplicated Lines (%)

Volto Add-ons bundle - A known good set of Volto addons to be used within all EEA projects and beyond.

The eea.kitkat Plone add-on is the backend support for volto-eea-kitkat.

Included Volto Add-ons

  1. Releases Pipeline Pipeline @eeacms/volto-anchors
  2. Releases Pipeline Pipeline @eeacms/volto-matomo
  3. Releases Pipeline Pipeline @eeacms/volto-sentry-rancher-config
  4. Releases Pipeline Pipeline @eeacms/volto-controlpanel
  5. Releases Pipeline Pipeline @eeacms/volto-corsproxy
  6. Releases Pipeline Pipeline @eeacms/volto-taxonomy
  7. Releases Pipeline Pipeline @eeacms/volto-object-widget
  8. Releases Pipeline Pipeline @eeacms/volto-widget-theme-picker
  9. Releases Pipeline Pipeline @eeacms/volto-widget-toggle
  10. Releases Pipeline Pipeline @eeacms/volto-widget-temporal-coverage
  11. Releases Pipeline Pipeline @eeacms/volto-widget-geolocation
  12. Releases Pipeline Pipeline @eeacms/volto-slate-metadata-mentions
  13. Releases Pipeline Pipeline @eeacms/volto-slate-footnote
  14. Releases Pipeline Pipeline @eeacms/volto-slate-zotero
  15. Releases Pipeline Pipeline @eeacms/volto-accordion-block
  16. Releases Pipeline Pipeline @eeacms/volto-block-divider
  17. Releases Pipeline Pipeline @eeacms/volto-listing-block
  18. Releases Pipeline Pipeline @eeacms/volto-metadata-block
  19. Releases Pipeline Pipeline @eeacms/volto-group-block
  20. Releases Pipeline Pipeline @eeacms/volto-columns-block
  21. Releases Pipeline Pipeline @eeacms/volto-tabs-block
  22. Releases Pipeline Pipeline @eeacms/volto-block-image-cards
  23. Releases Pipeline Pipeline @eeacms/volto-nextcloud-video-block
  24. Releases Pipeline Pipeline @eeacms/volto-banner
  25. Releases Pipeline Pipeline @eeacms/volto-resize-helper
  26. Releases Pipeline Pipeline @eeacms/volto-block-style
  27. Releases Pipeline Pipeline @eeacms/volto-widget-dataprovenance
  28. Releases Pipeline Pipeline @eeacms/volto-slate-label
  29. Releases Pipeline Pipeline @eeacms/volto-call-to-action-block
  30. Releases Pipeline Pipeline @eeacms/volto-description-block
  31. Releases Pipeline Pipeline @eeacms/volto-hero-block
  32. Releases Pipeline Pipeline @eeacms/volto-quote-block
  33. Releases Pipeline Pipeline @eeacms/volto-statistic-block
  34. Releases Pipeline Pipeline @eeacms/volto-tags-block
  35. Releases Pipeline Pipeline @eeacms/volto-timeline-block
  36. Releases Pipeline Pipeline @eeacms/volto-toolbar-actions
  37. Releases Pipeline Pipeline @eeacms/volto-block-data-table
  38. Releases @plone-collective/volto-sentry

Upgrade

Upgrading to 25.x

This version adds support for Volto 17 and it is meant to be used with Volto 17+. It may work with Volto 16 but it is not fully backward compatible (especially in Teaser block, anchors, listing), thus upgrading volto-eea-kitkat to version 25+ implies also upgrading to Volto 17+.

Add-ons removed

  1. @kitconcept/volto-blocks-grid

Add-ons added

  1. @eeacms/volto-block-toc

Upgrading to 20.x

This versions comes with @eeacms/volto-tabs-block 17.x. See this package upgrade guide

Upgrading to 10.x

This version requires: @plone/volto >= 16.0.0.alpha.45 (Sentry removed from Volto Core).

New add-ons added

  1. @plone-collective/volto-sentry
  2. @kitconcept/volto-blocks-grid
  3. @eeacms/volto-slate-label
  4. @eeacms/volto-call-to-action-block
  5. @eeacms/volto-description-block
  6. @eeacms/volto-hero-block
  7. @eeacms/volto-quote-block
  8. @eeacms/volto-statistic-block
  9. @eeacms/volto-tags-block
  10. @eeacms/volto-timeline-block

Upgrading to 9.x

This version requires: @plone/volto >= 16.0.0.alpha.15 (volto-slate part of Volto Core).

Dropped dependencies (moved to Volto Core)

  1. volto-slate
  2. volto-block-toc

Resolutions

Volto EEA KitKat provides a set of generic Volto Add-ons and a Known Good Set of these add-ons versions to be used within your Volto projects without having to worry about which add-on version works best with another add-on.

While in other systems when you pin a package version to a specific number you will get that package version, in Javascript world is not that simple.

For this, Volto EEA Kitkat is using selective dependency resolutions. While this work as expected in most of the cases, you may still have some surprises.

Troubleshooting

  1. Make sure your Volto project yarn.lock is not polluted. You can always reset your Volto project yarn.lock with:

     $ npm install -g @plone/generator-volto
     $ cd my-volto-project
     $ yo @plone/volto --skip-install --no-interactive /tmp/new-volto-project
     $ cp /tmp/new-volto-project/yarn.lock .
     $ yarn
    
  2. Add-on resolutions don't work with workspaces (development mode), thus you'll need to define resolutions within Volto project. To tackle this issue, this Docker image automatically extracts resolutions from add-on and add them also to the Volto project before running tests.

Getting started

Try volto-eea-kitkat with Docker

  git clone https://github.com/eea/volto-eea-kitkat.git
  cd volto-eea-kitkat
  make
  make start

Go to http://localhost:3000

Add volto-eea-kitkat to your Volto project

  1. Make sure you have a Plone backend up-and-running at http://localhost:8080/Plone

    docker compose up backend
  2. Start Volto frontend

  • If you already have a volto project, just update package.json:

    "addons": [
        "@eeacms/volto-eea-kitkat"
    ],
    
    "dependencies": {
        "@eeacms/volto-eea-kitkat": "*"
    }
  • If not, create one:

    npm install -g yo @plone/generator-volto
    yo @plone/volto my-volto-project --canary --addon @eeacms/volto-eea-kitkat
    cd my-volto-project
    
  1. Install new add-ons and restart Volto:

    yarn
    yarn start
    
  2. Go to http://localhost:3000

  3. Happy editing!

Release

See RELEASE.md.

How to contribute

See DEVELOP.md.

Copyright and license

The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.

See LICENSE.md for details.

Funding

European Environment Agency (EU)

volto-eea-kitkat's People

Contributors

alecghica avatar ana-oprea avatar andreiggr avatar avoinea avatar claudiaifrim avatar dana-cfc4 avatar demarant avatar dobri1408 avatar eea-jenkins avatar erral avatar ichim-david avatar kreafox avatar nileshgulia1 avatar petchesi-iulian avatar razvanmiu avatar tedw87 avatar valentinab25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

valentinab25

volto-eea-kitkat's Issues

New installation failing

This is what I tried. Any pointers on how to proceed?

โžœ  Lab nvm use 16
Now using node v16.20.0 (npm v8.19.4)
โžœ  Lab yo @plone/volto eea-kitkat-volto --addon @eeacms/volto-eea-kitkat
Getting latest Volto version
Using latest released Volto version: 16.21.0
Retrieving Volto's yarn.lock
[...]
success Saved lockfile.
$ make omelette && make patches
โœจ  Done in 103.36s.

Done.

Now go to eea-kitkat-volto and run:

yarn start

โžœ  Lab cd eea-kitkat-volto 
โžœ  eea-kitkat-volto yarn
[...]
โžœ  eea-kitkat-volto yarn start
 WAIT  Compiling...


โœ” Client
  Compiled successfully in 436.06ms

โœ” Server
  Compiled successfully in 12.24s

`isModuleDeclaration` has been deprecated, please migrate to `isImportOrExportDeclaration`
    at isModuleDeclaration (/Users/pieronicolli/Lab/eea-kitkat-volto/node_modules/@babel/types/lib/validators/generated/index.js:2740:35)
    at PluginPass.Program (/Users/pieronicolli/Lab/eea-kitkat-volto/node_modules/babel-plugin-lodash/lib/index.js:102:44)
/Users/pieronicolli/Lab/eea-kitkat-volto/node_modules/countup.js/dist/countUp.min.js:1
var t=function(){return t=Object.assign||function(t){for(var i,n=1,s=arguments.length;n<s;n++)for(var a in i=arguments[n])Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a]);return t},t.apply(this,arguments)},i=function(){function i(i,n,s){var a=this;this.endVal=n,this.options=s,this.version="2.6.2",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(t){a.startTime||(a.startTime=t);var i=t-a.startTime;a.remaining=a.duration-i,a.useEasing?a.countDown?a.frameVal=a.startVal-a.easingFn(i,0,a.startVal-a.endVal,a.duration):a.frameVal=a.easingFn(i,a.startVal,a.endVal-a.startVal,a.duration):a.frameVal=a.startVal+(a.endVal-a.startVal)*(i/a.duration);var n=a.countDown?a.frameVal<a.endVal:a.frameVal>a.endVal;a.frameVal=n?a.endVal:a.frameVal,a.frameVal=Number(a.frameVal.toFixed(a.options.decimalPlaces)),a.printValue(a.frameVal),i<a.duration?a.rAF=requestAnimationFrame(a.count):null!==a.finalEndVal?a.update(a.finalEndVal):a.options.onCompleteCallback&&a.options.onCompleteCallback()},this.formatNumber=function(t){var i,n,s,e,o=t<0?"-":"";i=Math.abs(t).toFixed(a.options.decimalPlaces);var r=(i+="").split(".");if(n=r[0],s=r.length>1?a.options.decimal+r[1]:"",a.options.useGrouping){e="";for(var l=3,h=0,u=0,p=n.length;u<p;++u)a.options.useIndianSeparators&&4===u&&(l=2,h=1),0!==u&&h%l==0&&(e=a.options.separator+e),h++,e=n[p-u-1]+e;n=e}return a.options.numerals&&a.options.numerals.length&&(n=n.replace(/[0-9]/g,(function(t){return a.options.numerals[+t]})),s=s.replace(/[0-9]/g,(function(t){return a.options.numerals[+t]}))),o+a.options.prefix+n+s+a.options.suffix},this.easeOutExpo=function(t,i,n,s){return n*(1-Math.pow(2,-10*t/s))*1024/1023+i},this.options=t(t({},this.defaults),s),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(n),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,""===this.options.separator&&(this.options.useGrouping=!1),this.el="string"==typeof i?document.getElementById(i):i,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined","undefined"!=typeof window&&this.options.enableScrollSpy&&(this.error?console.error(this.error,i):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push((function(){return a.handleScroll(a)})),window.onscroll=function(){window.onScrollFns.forEach((function(t){return t()}))},this.handleScroll(this)))}return i.prototype.handleScroll=function(t){if(t&&window&&!t.once){var i=window.innerHeight+window.scrollY,n=t.el.getBoundingClientRect(),s=n.top+window.pageYOffset,a=n.top+n.height+window.pageYOffset;a<i&&a>window.scrollY&&t.paused?(t.paused=!1,setTimeout((function(){return t.start()}),t.options.scrollSpyDelay),t.options.scrollSpyOnce&&(t.once=!0)):(window.scrollY>a||s>i)&&!t.paused&&t.reset()}},i.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var i=t-this.startVal;if(Math.abs(i)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;var n=this.countDown?1:-1;this.endVal=t+n*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;null!==this.finalEndVal?this.useEasing=!1:this.useEasing=this.options.useEasing},i.prototype.start=function(t){this.error||(t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},i.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},i.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},i.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,null==this.finalEndVal&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},i.prototype.printValue=function(t){var i;if(this.el){var n=this.formattingFn(t);if(null===(i=this.options.plugin)||void 0===i?void 0:i.render)this.options.plugin.render(this.el,n);else if("INPUT"===this.el.tagName)this.el.value=n;else"text"===this.el.tagName||"tspan"===this.el.tagName?this.el.textContent=n:this.el.innerHTML=n}},i.prototype.ensureNumber=function(t){return"number"==typeof t&&!isNaN(t)},i.prototype.validateValue=function(t){var i=Number(t);return this.ensureNumber(i)?i:(this.error="[CountUp] invalid start or end value: ".concat(t),null)},i.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},i}();export{i as CountUp};
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

SyntaxError: Unexpected token 'export'
    at Object.compileFunction (node:vm:360:18)
    at wrapSafe (node:internal/modules/cjs/loader:1124:15)
    at Module._compile (node:internal/modules/cjs/loader:1160:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
    at Module.load (node:internal/modules/cjs/loader:1074:32)
    at Function.Module._load (node:internal/modules/cjs/loader:909:12)
    at Module.require (node:internal/modules/cjs/loader:1098:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at Object.<anonymous> (/Users/pieronicolli/Lab/eea-kitkat-volto/node_modules/react-countup/build/index.js:6:18)
    at Module._compile (node:internal/modules/cjs/loader:1196:14)
sswp> !!! Script exited with code 1

module resolutions does not work

Looks like the resolutions don't work in kitkat resulting one or more broken addon version being still pulled into the project.

As a workaround adding "resolutions" object in respective addon/project and pinning the needed overrides for an addon/module does solves the use case.
I propose documenting it somewhere and making it futureproof.

Volto 17.0.1 site instance fails to compile with kitkat

Including kitkat in a Volto 17.0.1 frontend instance causes the build and started instance to fail. The build and start are successful if kitkat is not included or with a pre-17 version of Volto. (I'm using kitkat successfully with Volto 16.22.2.)

Specifically:

  • When I try to run a recent cookiecutter instance in which I include @eeacms/volto-eea-kitkat, visiting any page on a site started with yarn start contains only:

    Failed to compile
    
    Should not import the named export 'version' (imported as 'voltoVersion') from default-exporting module (only default export is available soon)
    
    This error occurred during the build time and cannot be dismissed.
    
  • If I try to compile with the frontend make build-image, the build fails with similar diagnostic:

[...]
264.7 Compiling client default build...
264.7
505.6 Failed to compile client default build.
505.6
505.6 Should not import the named export 'version' (imported as 'voltoVersion') from default-exporting module (only default export is available soon)
505.6     at HarmonyImportSpecifierDependency.getLinkingErrors (/build/node_modules/webpack/lib/dependencies/HarmonyImportDependency.js:211:7)
505.6     at HarmonyImportSpecifierDependency._getErrors (/build/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:202:15)
[...]

I've poked around a little trying to include the various addons which kitkat brings in, instead of kitkat as a whole, and it still doesn't work.

Is kitkat going to be brought into compliance with Volto 17.0.1?

HTML block becomes unavailable when volto-eea-kitkat is added

The HTML block became unavailable for inclusion on a page in recent builds that include volto-eea-kitkat.

Strangely, the HTML block is available if I include all the addons that kitkat contains, but not the kitkat collection itself.

Here is the Plone+frontend build versions:

Volto 16.3.0
Plone 6.0.0rc2
plone.restapi 8.32.4
CMF 2.6.0
Zope 5.7
Python 3.10.8 (main, Nov 15 2022, 21:06:05) [GCC 10.2.1 20210110]
PIL 9.3.0 (Pillow)

Here are the addons that are included with kitkat, but don't inhibit availability of the html block if I add them specifying each rather than via kitkat:

@plone/volto-slate 16.3.0
@eeacms/volto-corsproxy 3.0.1
@eeacms/volto-object-widget 5.0.1
@eeacms/volto-widgets-view 4.0.1
@eeacms/volto-widget-toggle 3.0.1
@eeacms/volto-slate-metadata-mentions 6.0.1
@eeacms/volto-slate-footnote 6.0.2
@eeacms/volto-accordion-block 6.0.0
@eeacms/volto-block-divider 5.0.0
@eeacms/volto-listing-block 2.2.0
@eeacms/volto-metadata-block 5.0.1
@eeacms/volto-group-block 5.0.1
@eeacms/volto-columns-block 5.1.0
@eeacms/volto-resize-helper 1.0.1
@eeacms/volto-block-style 4.1.2
@eeacms/volto-tabs-block 3.0.1
@eeacms/volto-block-image-cards 1.0.1
@eeacms/volto-banner 3.0.1
@eeacms/volto-slate-label 0.4.4
@eeacms/volto-call-to-action-block 2.0.0
@eeacms/volto-description-block 1.0.1
@eeacms/volto-hero-block 2.0.0
@eeacms/volto-quote-block 1.0.1
@eeacms/volto-statistic-block 1.0.1
@eeacms/volto-tags-block 1.0.1
@eeacms/volto-timeline-block 1.0.1
@kitconcept/volto-blocks-grid 5.2.0
@eeacms/volto-matomo 3.0.1
@eeacms/volto-sentry-rancher-config 3.0.1
@eeacms/volto-depiction 1.0.1
@eeacms/volto-taxonomy 3.0.1
@eeacms/volto-widget-geolocation 5.0.1
@eeacms/volto-slate-zotero 5.0.2
@eeacms/volto-widget-dataprovenance 0.2.1
@plone-collective/volto-sentry 0.3.0
@eeacms/volto-widget-temporal-coverage 5.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.