-
Notifications
You must be signed in to change notification settings - Fork 444
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
pkp/pkp-lib#3594 Add entity schema and Vue.js forms for context #3931
Conversation
NateWr
commented
Jul 17, 2018
- Add json-schema for contexts
- Add service class to read, sanitize, validate and merge schemas
- Add SchemaDAO to read, write and sanitize by schema
- Update ContextDAO to extend SchemaDAO
- Add get, create, edit and delete API endpoints for contexts
- ContextService now uses schema to produce summary/full props
- ContextService now uses schema to install defaults
- Add FormHandler and form Field types
- Add locale strings for form validation errors
- Replace add/edit context form
- Replace context masthead form
- Replace website information form
- Replace context contact form
- Allow plugins to extend context schema and forms
8dbc301
to
3db3202
Compare
|
ad6ef31
to
e870431
Compare
3e1bb71
to
d2265dd
Compare
d3a1e55
to
a8c1605
Compare
👍 Thanks for the review! I've put some comments on the stuff that needs some discussion. I'll dig into the fixes next week. |
0f23360
to
c3fb691
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, I've got a pending review here so I probably forgot to submit some comments at some point?
9d0537c
to
02e6531
Compare
b445a4d
to
ced6dc2
Compare
- Add json-schema for context and sitee - Add CLI tool to build swagger API docs using schemas - Convert swagger definitions to schemas - Add json linting to tests - Add service class to read, sanitize and merge schemas - Add Laravel's Validation library and refactor Validator classes - Add SchemaDAO to read, write and sanitize by schema - Update ContextDAO to extend SchemaDAO - Add GET, POST, PUT, DELETE endpoints for contexts - Add GET, PUT endpoints for site - Add temporaryFiles endpoint for file uploads - Add GET, PUT endpoints for context theme options - Use schema to produce summary/full props for contexts and site - Add CSRFToken middleware to the API and use in form components - Deprecate Context::getSettings() in favor of getData() - Add FormComponent and form Field types - Add locale strings for form validation errors - Replace context and site settings forms - Allow plugins to extend context schema and forms - Change sequence to seq in API to match underlying data structure - pkp#3855 Permit @localhost email addresses - Install journal and site defaults from schema - pkp#3709 Add additional badges for CC3 licenses - Remove copyrightNoticeAgree. Instead, check if copyrightNotice exists - Set a max-width for main page content - Migrate activate block plugins from plugin_settings to context settings table - Remove setting_type from database XML - Move article/monograph permission reset to tools page - Fix auth checks in API endpoints - Improve failed authorization or endpoint not found error messages in API - Move announcement creation to top-level nav item - Use consistent hooks for adding tabs to settings pages - Replace metadata settings grid with form fields - Allow ModalHandler.js to clean up child Vue instances when closed - Rebuild journal settings wizard - Rename ListHandlers to ListPanels and move to /components directory - Update help panel handler to work without .md extensions, to fix an issue with some servers which try to serve the .md files directly
Namespacing and conventions: - Use namespaces for form components - Update autoload to use APP namespace instead of OJS so it can be used across apps - Use a shorter syntax for getting service classes - Use interfaces and traits to enforce common patterns in service classes - Replace Router::getApiUrl with APIRouter::ur Fixes: - Fix PUT, POST, DELETE requests when disable_path_info is on [1] - Add CSRF token to file upload fields - Use FileManager helper methods to access uploaded files - Allow empty sidebar values when validating context - Move METADATA_* constants into Context class - Fix capitalization when updating site during install - Remove deprecated context depth in plugin settings install - Fix submissions link in nav menu - Fix reviewer guidance form field name - Fix galley schema definition - Use description in FieldHTML so the value is not submitted with form - Fix static method warnings in PKPApplication - Don't allow a PUT request for a context to the site-wide API [2] - Fix locale settings for all contexts when locale is uninstalled by site Tests: - Fix JS validation errors - Do not use sudo when installing linter because npm is not available to sudo - Update help file validation to expect filenames without .md - Add WebTestCase method to set input values and trigger Vue data sync - Replace use of ->getSetting() method - Use faster method for checking tinyMCE initialization in tests - Restore ValidatorUri used in metadata test - Restore ValidatorDate used in filter test - Don't allow empty values for validators [1] When disable_path_info is on, we have to manually correct the URL in Slim's request object, and reprocess the request to kick off the middleware. However, the request object that we save to the handler is not updated (because PSR-7 Request objects are considered immutable, so the request is recreated rather than being updated, as it is passed through the middleware). This commit saves a new copy of the request object to the handler, so that it can be found in APIHandler::getRequestedOp(). [2] If a context is edited at a site-wide API endpoint, it will not have all of the correct plugins loaded. So all requests to edit a context must go through a context-specific API endpoint.
- Convert context getSetting to getData - Move assignedToSection user query arg to OJS - Fix assigned subeditors value in PKPSectionForm - Handle applications (OJS/OMP) that don't allow more than one context - Fix user access help liinks - Remove unused locale strings - Fix docblock for form components - Change journal to context in locale keys - Move several context properties to OJS and move paymentsEnabled from OJS to pkp-lib - Move shared migration scripts from OJS to pkp-lib - Remove references to ASSOC_TYPE_JOURNAL - Move add/edit/delete context into pkp-lib - Fix required citations check - Add app-specific classes for a few forms - Move /_payments API handler to pkp-lib - Update distribution settings tabs - Remove unused DateStringNormalizerFilter and ValidatorDate - Add test helper method for inline TinyMCE controls - Move some CreateContextTest methods to pkp-lib - Fix wrong variable name in WebTestCase::clickButton() - Fix missing competing interests fields in reviewer form - Fix test method to type into inline TinyMCE fields - Remove unused reviewerCompetingInterestsRequired context prop