Comments (5)
Thanks for the hint. Implemented in e61639f. The notification object returned by the validation endpoint can now have an optional parameter called messageParameters
holding all parameters:
{
"showNotification": false,
"priority": {
"type": "medium",
"value": 1
},
"messageParameters": {
"columnCount": 15
}
}
A message can then contain the parameter names in this form:{{columnCount}}
.
from q-editor.
Problem
- Currently we can only show a single notification per input field in the editor. This is intended behavior
- If there are multiple notifications available they get sorted by type (
low
,medium
,high
) and the notification with the highest priority gets displayed - The current implementation doesn't allow to prioritize notifications of the same type. This can results in unintended behavior.
- Example: TooManyColumns (more than 5 columns) notification gets shown instead of ShouldBeLineChart (more than 15 columns) notification -> example on q-beta
Proposed Solution
- Currently a validation endpoint returns an object in the following form:
{
"showNotification": false,
"priority": "medium"
}
- I propose to make the priority property an object:
{
"showNotification": false,
"priority": {
"type": "medium",
"value": 1
}
}
- The value property can be used to prioritize notifications of the same type
- So the notifications will be sorted by type (low, medium, high) and inside the notification type by priority value
@benib Would love to know what you think about this?
from q-editor.
@manuelroth seems legit. 👍
While we are at it: I would make the text in the displayed notification part of this object as well so the tool can take the current values into account when forming the message. Like 15 colums are a lot, consider a line chart
).
from q-editor.
While we are at it: I would make the text in the displayed notification part of this object as well so the tool can take the current values into account when forming the message. Like 15 colums are a lot, consider a line chart).
Currently the notification messages are stored in the translation file. If we put the messages directly into the notification object we can not support different languages. I would love to support data-based notification messages, but don't have a good idea for supporting both yet. Need to think more about it.
from q-editor.
Currently the notification messages are stored in the translation file. If we put the messages directly into the notification object we can not support different languages. I would love to support data-based notification messages, but don't have a good idea for supporting both yet. Need to think more about it.
i18n-next supports placeholders in translation strings. Maybe we could use this and pass the context data in the notification object.
See this in action here: https://github.com/nzzdev/Q-editor/blob/dev/client/locales/de/translation.json#L34
from q-editor.
Related Issues (20)
- Implement handling of sophieModules in editor preview
- Blueprinting of some items with arrays of objects fails (seen on Q-infographic)
- Remove cells containing only white-space characters around the data
- Allow to specify which part of the item should be sent with AvailabilityChecks
- AvailabilityChecks should allow to specify which part of the item should be sent HOT 1
- Admin page HOT 1
- Definition of the Check config format
- (schema-editor) show required state of inputs using notifications HOT 2
- Improve build process
- schema-editor-code HOT 1
- use a code editor for schema-editor-json
- Show reasonable error message if call to q-server/authenticate times out
- Remove the browser detection and "works only with chrome" warning HOT 2
- livingdocs-component should load stylesheets from editor config
- Translation issues HOT 5
- Preview loads item twice on page load of item overview page HOT 2
- Several Q tools seems missing HOT 3
- (livingdocs-component) Preview not visible if too many displayOptions
- Copy-pasting from Excel skips empty cells
- ERROR [Q] notificationCheck failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from q-editor.