keystonejs / keystone-classic Goto Github PK
View Code? Open in Web Editor NEWNode.js CMS and web app framework
Home Page: http://v4.keystonejs.com
License: MIT License
Node.js CMS and web app framework
Home Page: http://v4.keystonejs.com
License: MIT License
Hi, what do you think to add multilanguage? Maybe with i18next for "static text" and the possibility to set the language for "dynamic content" like posts.
Thanks for your time.
Best regards.
Keystone currently defaults to the in-memory datastore for the Session Express Middleware, which shouldn't be used in production.
There's a writeup on how to use redis or mongo for session management here:
http://blog.modulus.io/nodejs-and-express-sessions
The Keystone interface doesn't respect "wisywyg: false" for field "Types.Html".
If a list doesn't have any initial fields, the create
button / action should immediately create a new item and navigate to it.
The assumption is that any list without initial fields defined would auto-populate some data set to identify itself (e.g. timestamp / increment counter) - this case should be supported.
Relationship fields with filters that depend on other values become unavailable in the UI when (a) no value is set, or (b) the value is changed, until the item is saved because the filter values are resolved server-side based on the saved item data.
Client-side submission of the current value of the dependencies will make the workflow faster.
This should potentially include consolidation of the select2 implementation for relationship fields.
It would be really nice if you could type a descriptive string for a date (e.g. "next tuesday", "7th Nov 1998") into a date field and have it parse it for you, in addition to having the date picker.
Uploading images can take a while, so we should pop up an indicator when the form is submitted if there are image uploads queued.
May replace the editor entirely, TBD.
Currently being trialled and developed in the wysiwyg branch.
The address field is currently pretty specific to Australian addresses, it should be fixed up to better support different international address formats.
Might be good to allow customisation at the model level for enabling and labelling the different subpaths supported by the location field.
Should also possibly tie in to a localisation setting for Keystone itself (shared by date formats, language, etc.)
Implement integration with Google Maps APIs for address autocomplete and geolocation functionality, as well as misc. field enhancements, including:
datetime
fields currently simply use a text field, with no hints as to validity or format of input.
It should be split into a date field and a time field, with a timepicker ui possibly based on either
The technique used to fix the position of the toolbar at the bottom of the screen for forms that exceed the size of the viewport is jumpy in webkit.
Adding a list with an acronym, e.g. FAQ
results in a list path of fa-qs
Key fields currently behave like string fields and don't validate / strip input from keys.
They should remove any invalid characters from themselves, possibly using the utils.slug
logic.
Might be a good idea to support a customisable pattern for parsing input (actually this may be a good idea for string fields in general?)
Columns on the List screen can currently display fields (including relationship fields).
Relationships should be able to be displayed too.
Fields are currently only submitted server-side; Keystone could also provide client-side validation (or at least hilight invalid input in certain fields like dates, numbers, mismatched passwords, etc)
Similar to the select field, but allows the selection of multiple values (stores values as an array of Numbers or Strings).
UI configurable as either a list / grid of checkboxes, or a tags-style list (similar to many relationships).
Keystone currently uses the express.bodyParser middleware, which may cause issues with temporary files and has been updated in 3.4.0
It should be more flexible regarding the options for handling form submissions, and ideally automatically implement a best practice solution for handling submissions safely.
see https://groups.google.com/forum/#!topic/nodejs/6KOlfk5cpcM
and https://groups.google.com/forum/#!topic/express-js/iP2VyhkypHo
At the moment they display the encrypted field contents, not good for a few reasons!
Hi, what do you think about a multisite feature? For example a middleware that gets hosts from header used to mapping the sites, i'm using it in a little cms project that i've started months ago:
// Middleware to get the host for multisite
app.use(function (req, res, next) {
// Get the request host and map it to right database into redis
var domain = req.headers.host.split(':')[0];
// Set the parameters mapping
res.locals.mapping = parameters.vhost[domain];
// Check if site exists, otherwise send error
if(res.locals.mapping) {
// Set the view directory
res.locals.view_dir = __dirname + '/sites/' + res.locals.mapping + '/views';
// Set favicon if is enabled in configuration parameters
if (misc_params[res.locals.mapping].favicon) {
app.use(express.favicon(__dirname + '/sites/' + res.locals.mapping + misc_params[res.locals.mapping].favicon));
}
next();
} else {
utils.applog('error', "Requested and invalid site from: " + req.connection.remoteAddress);
res.send(parameters.server_error);
}
});
Best regards.
Currently images, passwords and locations still display their edit UI.
Item name fields are included in the form when the noedit
property is set to true, even though they are displayed immediately above as the name of the item.
The main UI nav should allow for groups of lists to be specified, for cases where there are more lists than horizontal room.
The homepage should render groups when specified.
Item lists should be able to be filtered by any field.
Ideally the UI would be portable to relationship lists as well.
Add an array
field type that stores a simple list of String
, Number
or Date
values.
The standard meta
pattern should understand whether a user model
has been defined, and if so, store created
/ changed
user as well as timestamps.
A generic handler to process item updates based on the logic in the item:update UI that can be used in projects to handle form submission with consolidated logic for validation, uploading, etc.
Available as a method on schemas as item.getUpdateHandler(req)
Options include:
fields
- whitelist of fields to update (defaults to all defined fields)flashErrors
- boolean (defaults to false), when true errors are added to req.flash('error', ...)
Example:
var updater = req.customer.getUpdateHandler(req);
updater.process(req.body, {
fields: 'name, email, phone, address, notes',
flashErrors: true
}, next);
Like this:
User.add({
name: { type: Types.Name, required: true, index: true },
email: { type: Types.Email, initial: true, required: true, index: true },
phone: { type: String, width: 'short' },
password: { type: Types.Password, initial: true, required: true }
}, 'Permissions', {
isAdmin: { type: Boolean, label: 'Can access Keystone' }
};
Any strings passed as arguments to the List.add
method should indicate a heading.
Autokeys where from
is set to a complex field type (e.g. name) break.
They should detect a field matching the from
path and use the field to
isModified
format
value rather than item.get(path)
name
cloudinaryimage
and location
fields will need to extend isModified
Add a color
field type:
As noted in #66 could also have a color picker for the field in the Admin UI.
All item fields and relationships should be selectable as columns on the List screen.
Some polish to be added to the new client-side image uploading:
You currently get an obscure Jade error if a relationship is misconfigured or pointed at an invalid List key.
There needs to be some validation that warns about what is actually wrong, or it could be very confusing to debug.
Currently, invalid data is passed to mongoose which throws an unfriendly error.
Initial fields should support all file types.
Todo:
html
cloudinaryimage
location
utils.keyToLabel
really needs to be rewritten (could be looked at in conjunction with #2)
Keystone currently implements independent validation for required fields, as well as limited support for Mongoose's built in validation.
It may be possible to better integrate the two, or have Keystone's implementation be simpler in favour of Mongoose's features.
path: { type: String, hidden: true }
Hidden fields should be left out of the UI on the item details screen, but submitted values would still be processed by the item updateHandler
.
This would allow for custom UIs to be built against fields you don't want to be generally displayed in the UI (e.g. for usability reasons) but don't need to protect with noedit
.
Relationship fields that depend on other fields via filters should become uneditable when any field they are dependent on changes, until the item is saved.
They should also clear their value so that the now-invalid data does not remain in the database.
This would create an array of images on a model.
This is useful for all types of content including blog posts, events and image galleries.
id, _id, _, etc.
You should be able to edit the public_id and other fields of a CloudinaryImage field (advanced mode).
Should include copy + paste functionality to copy images from one item to another.
Allow item
Also
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.