-
Notifications
You must be signed in to change notification settings - Fork 45
Add alt_text field to image content type #701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
e5004cf
Add alt_text field to image content type
jackahl c98e576
Fix typo in image type alt field description
jackahl 8a14bd3
Setup local installation
ericof f540988
Fix MANIFEST.in
ericof f70879b
set install as default command in makefile
jackahl 3f215dc
Merge branch 'setup-standalone-installation' into add-image-alt-tag
jackahl c95678e
formatting
jackahl 6ffeaff
fix test for alt text in image templates
jackahl cb58563
Merge branch 'add-image-alt-tag' of github.com:plone/plone.app.conten…
jackahl 0a3fb93
include alt_tag in listing templates as well
jackahl 6a4cce5
remove test for svg image alt
jackahl 9a8e282
add alt_text indexer
jackahl f0b02e2
add upgrade_step for alt_field
jackahl 3ae8f74
Revert "add upgrade_step for alt_field"
jackahl 55faeec
onyl try to retrieve alt_text in listing template if applicable
jackahl 1fe65fc
fix for crash on album view
jackahl d4c998d
prevent potential errors on tabular and summary views due to alt images
jackahl 1cae6fe
Merge branch 'master' into add-image-alt-tag
jensens c6594ec
Merge branch 'master' into add-image-alt-tag
mauritsvanrees eec97df
image schema: move new alt_text field after the image field.
mauritsvanrees File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,8 @@ local.cfg | |
/venv/ | ||
.installed.txt | ||
|
||
/test_* | ||
robot_* | ||
|
||
## | ||
# Add extra configuration options in .meta.toml: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
### Defensive settings for make: | ||
# https://tech.davis-hansson.com/p/make/ | ||
SHELL:=bash | ||
.ONESHELL: | ||
.SHELLFLAGS:=-xeu -o pipefail -O inherit_errexit -c | ||
.SILENT: | ||
.DELETE_ON_ERROR: | ||
MAKEFLAGS+=--warn-undefined-variables | ||
MAKEFLAGS+=--no-builtin-rules | ||
|
||
# We like colors | ||
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects | ||
RED=`tput setaf 1` | ||
GREEN=`tput setaf 2` | ||
RESET=`tput sgr0` | ||
YELLOW=`tput setaf 3` | ||
|
||
BACKEND_FOLDER=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | ||
DOCS_DIR=${BACKEND_FOLDER}/docs | ||
|
||
# Python checks | ||
PYTHON?=python3 | ||
|
||
# installed? | ||
ifeq (, $(shell which $(PYTHON) )) | ||
$(error "PYTHON=$(PYTHON) not found in $(PATH)") | ||
endif | ||
|
||
# version ok? | ||
PYTHON_VERSION_MIN=3.8 | ||
PYTHON_VERSION_OK=$(shell $(PYTHON) -c "import sys; print((int(sys.version_info[0]), int(sys.version_info[1])) >= tuple(map(int, '$(PYTHON_VERSION_MIN)'.split('.'))))") | ||
ifeq ($(PYTHON_VERSION_OK),0) | ||
$(error "Need python $(PYTHON_VERSION) >= $(PYTHON_VERSION_MIN)") | ||
endif | ||
|
||
all: install | ||
|
||
# Add the following 'help' target to your Makefile | ||
# And add help text after each target name starting with '\#\#' | ||
.PHONY: help | ||
help: ## This help message | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
.PHONY: clean | ||
clean: clean-build clean-pyc clean-test clean-venv clean-instance ## remove all build, test, coverage and Python artifacts | ||
|
||
.PHONY: clean-instance | ||
clean-instance: ## remove existing instance | ||
rm -fr instance etc inituser var | ||
|
||
.PHONY: clean-venv | ||
clean-venv: ## remove virtual environment | ||
rm -fr bin include lib lib64 env pyvenv.cfg .tox .pytest_cache constraints-mxdev.txt requirements-mxdev.txt sources/ | ||
|
||
.PHONY: clean-build | ||
clean-build: ## remove build artifacts | ||
rm -fr build/ | ||
rm -fr dist/ | ||
rm -fr .eggs/ | ||
rm -fr parts/ | ||
rm -fr coverage.xml | ||
find . -name '*.egg-info' -exec rm -fr {} + | ||
find . -name '*.egg' -exec rm -rf {} + | ||
|
||
.PHONY: clean-pyc | ||
clean-pyc: ## remove Python file artifacts | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
find . -name '__pycache__' -exec rm -fr {} + | ||
|
||
.PHONY: clean-test | ||
clean-test: ## remove test and coverage artifacts | ||
rm -f .coverage | ||
rm -fr htmlcov/ | ||
rm -fr test_* | ||
rm -fr robot_* | ||
|
||
bin/pip bin/tox bin/mxdev: | ||
@echo "$(GREEN)==> Setup Virtual Env$(RESET)" | ||
$(PYTHON) -m venv . | ||
bin/pip install -U "pip" "wheel" "cookiecutter" "mxdev" "tox" "pre-commit" | ||
bin/pre-commit install | ||
|
||
.PHONY: config | ||
config: bin/pip ## Create instance configuration | ||
@echo "$(GREEN)==> Create instance configuration$(RESET)" | ||
bin/cookiecutter -f --no-input --config-file instance.yaml gh:plone/cookiecutter-zope-instance | ||
|
||
.PHONY: install-plone-6.0 | ||
install-plone-6.0: config ## pip install Plone packages | ||
@echo "$(GREEN)==> Setup Build$(RESET)" | ||
bin/mxdev -c mx.ini | ||
bin/pip install -r requirements-mxdev.txt | ||
|
||
.PHONY: install | ||
install: install-plone-6.0 ## Install Plone 6.0 | ||
|
||
.PHONY: start | ||
start: ## Start a Plone instance on localhost:8080 | ||
PYTHONWARNINGS=ignore ./bin/runwsgi instance/etc/zope.ini | ||
|
||
.PHONY: console | ||
console: ## Start a console on a Plone instance | ||
PYTHONWARNINGS=ignore ./bin/zconsole debug instance/etc/zope.conf | ||
|
||
.PHONY: format | ||
format: bin/tox ## Format the codebase according to our standards | ||
@echo "$(GREEN)==> Format codebase$(RESET)" | ||
bin/tox -e format | ||
|
||
.PHONY: lint | ||
lint: ## check code style | ||
bin/tox -e lint | ||
|
||
# Tests | ||
.PHONY: test | ||
test: bin/tox ## run tests | ||
bin/tox -e test | ||
|
||
.PHONY: test-coverage | ||
test-coverage: bin/tox ## run tests with coverage | ||
bin/tox -e coverage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-c https://dist.plone.org/release/6.0.13/constraints.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
default_context: | ||
initial_user_name: 'admin' | ||
initial_user_password: 'admin' | ||
|
||
zcml_package_includes: ['plone.app.contenttypes'] | ||
|
||
db_storage: direct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
; This is a mxdev configuration file | ||
; it can be used to override versions of packages already defined in the | ||
; constraints files and to add new packages from VCS like git. | ||
; to learn more about mxdev visit https://pypi.org/project/mxdev/ | ||
|
||
[settings] | ||
main-package = -e .[test] | ||
version-overrides = | ||
plone.app.contenttypes >= 4.0.1.dev0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Setup local installation | ||
[@ericof] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Add alt_text field to image content type. This allows users to manually set the value of alt tag, for usage in automated listings. | ||
[@cekk, @jackahl] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-c constraints.txt |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.