-
Notifications
You must be signed in to change notification settings - Fork 30
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
WIP ui: migrate to react-formule #2878
base: master
Are you sure you want to change the base?
Conversation
294a4c8
to
de99133
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2878 +/- ##
==========================================
+ Coverage 75.05% 75.08% +0.02%
==========================================
Files 194 194
Lines 7983 7983
==========================================
+ Hits 5992 5994 +2
+ Misses 1991 1989 -2 |
7ced7a8
to
83c3340
Compare
4732167
to
f319487
Compare
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
} | ||
|
||
.__PublishedForm__ { |
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.
should we add in formule? is it needed with new updates on published perview?
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.
In fact we shouldn't need this anymore since we will replace this view with the published version of fields (for TextArea it will just be a string instead of a disabled TextArea)
|
||
const CAPDeposit = ({ data }) => { | ||
const [showModal, setShowModal] = useState(false); | ||
|
||
console.log(JSON.stringify(data, null, 2)); |
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.
remove
lang="json" | ||
initialValue={JSON.stringify(data, null, 2)} | ||
lint="json" | ||
isEditable={false} // TODO: Change to !isEditable? |
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.
should we add issue for future fix?
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.
Not needed, actually I'll just switch to a CodeViewer
here instead since we don't need to edit
pathname.startsWith(CMS_NEW) | ||
? schema.size == 0 && schemaInit() | ||
: getSchema(schema_name, schema_version); | ||
if (schema_name == "new") { |
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.
maybe add issue to handle this better in the future
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.
Done #2898
const CreateForm = ({ history }) => { | ||
const onFinish = content => { | ||
let { name, description } = content; | ||
const config = { config: { fullname: name } }; |
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.
add issue to fix structure of data (config
, name
, schema
, etc)
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.
Also added it to the same issue #2898
@@ -27,21 +27,7 @@ import { | |||
} from "@ant-design/icons"; | |||
|
|||
import { configSchema } from "../utils/schemaSettings"; | |||
import Form from "../../forms/Form"; | |||
|
|||
// const initialStatePermissions = Map({ |
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.
maybe leave as documentation
@@ -61,38 +60,42 @@ const Header = ({ | |||
const a = document.createElement("a"); | |||
const file = new Blob([fileData], { type: "text/json" }); | |||
a.href = URL.createObjectURL(file); | |||
a.download = "fileName.json"; //TODO: Should be a proper name | |||
a.download = `${config.toJS().name || "cap-schema"}-export-v${ | |||
config.toJS().version |
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.
fix since it appends undefined
when version doesnt exist
import { schema, uiSchema } from "../utils"; | ||
import { DeleteOutlined } from "@ant-design/icons"; | ||
import { FormuleForm } from "react-formule"; |
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.
we should update schema/uiSchema to work in notification creation
- update schema
- check that pathSuggester field works
// review: { users: [], roles: [] }, | ||
// }, | ||
// }); | ||
import { FormuleForm } from "react-formule"; |
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.
we should update the getSchemaPermissions
to return correct (empty?) value when schema is new
bump |
f26fb78
to
a918d29
Compare
Signed-off-by: Miguel Garcia Garcia <[email protected]>
Signed-off-by: Miguel Garcia Garcia <[email protected]>
cf6337e
to
61c4524
Compare
4ec4401
to
0dc2d63
Compare
* Split react-formule from bundle in order to have <20MB sourcemaps * Avoid copying sourcemaps to final image to reduce size Signed-off-by: Miguel Garcia Garcia <[email protected]>
0dc2d63
to
b4ed933
Compare
DO NOT MERGE YET (testing in cap-dev)
This PR supersedes #2859
Closes #2688, #2891