Comments (11)
pr - #65
demo - https://yahoo.github.io/jafar/demo-react-layout.html#/item/sections-grid/html
available on v1.0.7
from jafar.
Beautiful and elegant! @galhavivi
from jafar.
I agree its more clean :) and when I'll use it ill probably do like you suggested... but i think it might be better to keep the demo with the getGrid so it will be more clear to people that the grid configuration is an object of { templateAreas, elements } - rather than array (they might miss the last row of sections.map if well change it)
from jafar.
'benefits' can occupy two rows. See my updated picture
from jafar.
done :) i was slow here lol
from jafar.
@WangLarry
Thats a great idea and definitely more intuitive, thank you! :)
Let me check how we can offer a different / newer sections version based on grid.
we can have for example that each section will get content - array of strings (or array of arrays) instead of boxes like:
sections: [{
id: 'basic-info',
title: 'Basic Info',
content: [
"name name . . age age . .",
". . . . phone . . ."
],
}]
BTW - our advanced goal is to create also a Layout editor, where you will have all your defined fields in a list and you can drag & drop fields to some area - to create different layouts, and behind the scene it will translate to the sections json.
We had this feature in a prior version of Jafar in our portal, and it was very useful for non UI developers - such as backend devs or product manages to create different layouts for the same form based on user role / permissions.
For example - one set of user can get a different layout that another set of users (different sections and fields order) - but both based on the same form model fields. :)
from jafar.
Maybe It looks pleasant to get rid of 'getGrid()' in array?
grid: [
'firstName lastName .',
'personalId address .',
],
...
sections.map(section => ({...section, grid: getGrid(section.grid)})
Oh, current syntax can style every row.
from jafar.
Maybe we should show the feature of gird - can span rows. For example:
grid: getGrid([
'department benefits . ',
'level benefits . ',
]),
from jafar.
Not sure i understand what you meant ..?
from jafar.
from jafar.
like this?
from jafar.
Related Issues (20)
- Update layout popover to be in parent element HOT 1
- Add online form editor HOT 1
- Support wizard form? HOT 2
- AsyncMultiSelect display 'no options' HOT 2
- Value or State change is not sync, so update data in react component is wrong in some scenes HOT 15
- Add updater option to changeState and changeValue actions HOT 1
- 'react editor' link is broken HOT 2
- Support dense layout HOT 9
- The description of 'Path' in document is wrong. HOT 1
- Support shorthand definitions of validators HOT 3
- Logger don't work. HOT 6
- Add layout editor HOT 5
- rect-editor - support fields library HOT 4
- react-editor - Improve layout section edit
- Support custom styles for selects
- Bug - form gets new actions after destroy causing page to crash
- Who uses Jafar? 🌟 HOT 1
- Add component mapper util
- react-components - update components to use toJafar hoc util
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 jafar.