Code Monkey home page Code Monkey logo

plone.org's Introduction

Plone.org Site

Built with Cookiecutter Plone Starter Code analysis Backend testing.plone.org CI and Deploy Frontend testing.plone.org CI and deploy

The main destination for Plone

Quick start

Development Setup

  • Python 3.10
  • Node 16
  • yarn
  • Docker
  • Postgres 14

Create database

createdb ploneorg
createuser ploneorg

Install

git clone [email protected]:plone/plone.org.git
cd plone.org
make install

Start

Start the Backend (http://localhost:8080/)

make start-backend

Start the Frontend (http://localhost:3000/)

make start-frontend

Structure

This monorepo is composed by two distinct codebases: backend and frontend.

  • backend: API (Backend) Plone installation using pip (not buildout). Includes a policy package named ploneorg
  • frontend: React (Volto) package named frontend

Reasoning

  • Repo contains all codebase needed to run the site (excluding existing addons for Plone and React).
  • Github Workflows are triggered based on changes on each codebase (see .github/workflows)
  • Easier to create Docker images for each codebase
  • Showcase Plone installation/setup without buildout

Linters and Formatting

There are some hooks to run lint checks on the code. If you want to automatically format them, you can run

make format

in the root folder or especifically in each backend or frontend folders.

Linters commands are available in each backend and frontend folder.

Acceptance tests

There are Makefile commands in place:

build-test-acceptance-server: Build Acceptance Backend Server Docker image that it's being used afterwards. Must be run before running the tests, if the backend code has changed.

start-test-acceptance-server: Start server fixture in docker (previous build required)

start-test-acceptance-frontend: Start the Core Acceptance Frontend Fixture in dev mode

test-acceptance: Start Core Cypress Acceptance Tests in dev mode

Filestorage based backend alternative

The default setup assumes for local development you also have a PostgreSQL server running. As a convenience an example docker compose file is provided in the project root for such a service. If you prefer to use filestorage, you can look in the backend directory its Makefile and look at the alternative 'build-dev-fs' target, which depends on 'config-fs'. The difference with the normal 'config' target is the usages of instance-filestorage.yaml instead of instanc.yaml. These files are used as input for the application server scaffolding and switch the storage layer to either relstorage/postgresql or direct/filestorage.

For both storages, if you want to develop for plone.org and need a copy of the data, you will need to as another community member (preferably from the website-team or the AI-team) for a database dump.

Credits

This was generated by cookiecutter-plone-starter on 2022-10-14 12:14:12

plone.org's People

Contributors

davisagli avatar ebrehault avatar ericof avatar fosten avatar fredvd avatar jenkins-plone-org avatar jensens avatar mauritsvanrees avatar mpeeters avatar nzambello avatar pbauer avatar pnicolli avatar rishabhv471 avatar sneridagh avatar stevepiercy avatar tkimnguyen avatar yurj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

plone.org's Issues

Content: Recreate Mosaic pages on the new site with Volto Blocks

Vulnerability misses the overall CVSS score

The original plone.org had this in the vulnerability view:

Screenshot 2022-12-08 at 23 19 17

What is missing on the new plone.org:

I would say the way it looks currently is okay for the moment, but should be fixed before we have a new hotfix.

  • We need a restapi endpoint. What would be a good way to do this? Create a serialiser for the vulnerability type which includes all fields plus the above information? Of create an endpoint that specifically gets only the above missing info?
  • A view in the Volto frontend to show this.

Fix color contrast on the footer

Current contrast between white links and bacground grey is too low. Change footer background color to #595959 or darker to fix the issue.

Uploading contrast-footer.png…

Center-align columns in Icons and Text block

The "Icons and Text" block columns are left justified. On mobile especially, center is a better visual. Here is some css to center image, title, and text within the columns.

.block-icons-text .columns-wrapper .column-block {text-align:center;}
.block-icons-text .columns-wrapper .column-block.divider_before_title .column-head {justify-content: center;}

Content: Go through migrated content and check for issues

After migration, go through migrated content and check for problems. Write issues down here.

Since we create new pages for most main sections, old main pages can be hidden.

If you notice CSS-related problems, create new issues of those.

Accessibility: fix search button text

Search field button is empty, resulting to an accessibility error:

Screenshot 2022-11-11 at 18 50 28

Check if that is valid by following the instructions and fix if necessary

What It Means
A button is empty or has no value text.

Why It Matters
When navigating to a button, descriptive text must be presented to screen reader users to indicate the function of the button.

How to Fix It
Place text content within the element or give the element a value attribute.
The Algorithm... in English
A element is present that contains no text content (or alternative text), or an , , or has an empty or missing value attribute.

Standards and Guidelines
1.1.1 Non-text Content (Level A)
2.4.4 Link Purpose (In Context) (Level A)

Import-code lost and found

@ericof you dropped the code to import data from the old site. I resurrected it using my local reflog from revision 5b6f1c0 and will re-add it here.

Cookie banner improvements and fixes

The cookie banner in the https://beta.plone.org site could use some work.

Screenshot 2022-11-11 at 19 12 12

  • Bug: the X close button the right corner always mimimizes user choises to only functional cookies
  • Improvement: It is not generally goo to emphasize Accept all -button. Better to emphasize "only necessary" or "save my preferences"
  • Feature: need to add/change Google Analytics to Matomo - since we use that to analytics. However, if/when we use YouTube embeds (for Plone 6 screencasts or other), we need to allow Google advertisement cookies.
  • Improvement: Make the cookie button less obtrusive on the mobile view? Put it to footer maybe? This is just nice to have.
  • Bug: Fix cookie banner contrast issues (image below, tested with Wave toolbar):

Uploading Screenshot 2022-11-11 at 19.12.00.png…

Fix color contrast of breadcrumbs

Currently the breadcrumb contrast is too low. Color #777777 is too light grey over white background.

Change to #595959 at least to achieve AAA level accessibility.
contrast-breadcrumbs

Problem with new plone.org Volto website (frontpage)

Overall not bad, but there's plenty to improve, even just looking at the frontpage. Hats off to the contributors and many many thanks for pushing Plone forward!

image

The first slide button has the same color as the background image.

Cannot fully edit releasepage in Volto

The changelog and release notes fields do not work nicely.
I tried editing a changelog to remove some migration cruft, but that made it worse: the whole field is then shown with html codes plainly visible.

The changelog field stores reStructuredText. Maybe that is part of the problem.

Also, I always prepare the changelog (created automatically) and the release notes elsewhere, and then paste it. I tried pasting text in the field, but this does nothing. In the javascript console I see: "TypeError: undefined is not an object (evaluating 'l.children.length')".

Workaround available: use ClassicUI.

Content: Finalise front page for release

  • Banner image(s)
  • Tagline and clear description what Plone is
  • Plone 6 ad
  • News, events
  • Community
  • Feature highlights

Make it good enough for release before Dec 12th 2022.

New Plone Release page gets wrong id

On the old site, you would give the version 6.0.0, and this would be used as id, and the title is then Plone 6.0.0. On the new site, this becomes 'plone-6-0.0' or when you try it in classic I get '6-0.0'. As workaround I renamed it in the good old ZMI...

Note to self: see if I can move a new release to the top automatically.

Adding plonerelease fails

I try adding a plonerelease:
https://migration.plone.org/download/add?type=plonerelease
Add a version number, say 6.0.0rc2, and click the Save button. Result is an error:

Errore 500: can't set attribute 'title'

For plonerelease objects we do not allow setting a title, because we use the version number for that.

The POST goes to https://migration.plone.org/++api++/download
Traceback as I see it in the response is:

File "/app/lib/python3.10/site-packages/ZPublisher/WSGIPublisher.py", line 167, in transaction_pubevents
    yield
  File "/app/lib/python3.10/site-packages/ZPublisher/WSGIPublisher.py", line 376, in publish_module
    response = _publish(request, new_mod_info)
  File "/app/lib/python3.10/site-packages/ZPublisher/WSGIPublisher.py", line 271, in publish
    result = mapply(obj,
  File "/app/lib/python3.10/site-packages/ZPublisher/mapply.py", line 85, in mapply
    return debug(object, args, context)
  File "/app/lib/python3.10/site-packages/ZPublisher/WSGIPublisher.py", line 68, in call_object
    return obj(*args)
  File "/app/lib/python3.10/site-packages/plone/rest/service.py", line 22, in __call__
    return self.render()
  File "/app/lib/python3.10/site-packages/plone/restapi/services/__init__.py", line 19, in render
    content = self.reply()
  File "/app/lib/python3.10/site-packages/plone/restapi/services/content/add.py", line 55, in reply
    obj = create(self.context, type_, id_=id_, title=title)
  File "/app/lib/python3.10/site-packages/plone/restapi/services/content/utils.py", line 63, in create
    obj = factory(new_id, title=title)
  File "/app/lib/python3.10/site-packages/plone/dexterity/factory.py", line 39, in __call__
    obj = klass(*args, **kw)
  File "/app/lib/python3.10/site-packages/plone/dexterity/content.py", line 347, in __init__
    self.setTitle(title)
  File "/app/lib/python3.10/site-packages/plone/dexterity/content.py", line 629, in setTitle
    self.title = safe_unicode(title)

I guess one way that might solve this, is to add a setTitle method to our content type class.
Okay, that works locally. I will make a PR.

Release page shows downloads as simple text.

Split off from issue #55. I think this is a frontend task.

Meta question: does it make sense to add labels for this in the issue tracker? Labels like frontend/volto, backend/classic, contents, deployment.

The release page content type has a Files field, which used to be a datagrid field, see screenshot from editing current plone.org:

Screenshot 2022-12-08 at 17 15 33

On beta.plone.org it appears as plain text:

Unified Installer tarball -- builds Plone on most Linux/macOS/Windows 10 systems (5.6 MB, all platforms): https://launchpad.net/plone/5.2/5.2.10/+download/Plone-5.2.10-UnifiedInstaller-1.0.tgz
Unified Installer zip -- same as tarball, but easier to extract on Windows (5.6 MB, Windows): https://launchpad.net/plone/5.2/5.2.10/+download/Plone-5.2.10-UnifiedInstaller-1.0.zip

This format is stable, because this comes from a custom hook from the importer.

It would be good if the Volto view could handle this, either showing it as buttons, as used to be the case, or as simple bullet points. Here is how it used to look, in between the release notes and the changelog:

Screenshot 2022-12-08 at 22 55 23

My workaround: use classic UI to add this text to the release notes instead. I can't do this for all releases, but I did it for 5.2.10 now: https://beta.plone.org/download/releases/5.2.10. I think we will just ignore this for other past releases, and live with some ugly text for now.

For Plone 6 releases we won't use this field anyway: this was only for linking to Unified Installers on LaunchPad, and for Plone 6 we only do Docker.

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.