Skip to content
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

Fix inputs display #8935

Merged
merged 6 commits into from Dec 21, 2020
Merged

Fix inputs display #8935

merged 6 commits into from Dec 21, 2020

Conversation

soupette
Copy link
Contributor

@soupette soupette commented Dec 18, 2020

Signed-off-by: soupette cyril.lpz@gmail.com

What does it do?

We need to make a stable release of Buffet.js before merging this PR.

This PR fixes:

Signed-off-by: soupette <cyril.lpz@gmail.com>
@codecov
Copy link

codecov bot commented Dec 18, 2020

Codecov Report

Merging #8935 (12c1b03) into master (ae5edd3) will decrease coverage by 8.61%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8935      +/-   ##
==========================================
- Coverage   34.63%   26.02%   -8.62%     
==========================================
  Files        1308     1176     -132     
  Lines       14371    10128    -4243     
  Branches     1420      562     -858     
==========================================
- Hits         4978     2636    -2342     
+ Misses       8484     6993    -1491     
+ Partials      909      499     -410     
Flag Coverage Δ
front 26.02% <ø> (+<0.01%) ⬆️
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...nt-manager/admin/src/components/InputJSON/index.js 0.00% <ø> (ø)
...ent-manager/admin/src/components/InputUID/index.js 0.00% <ø> (ø)
...ent-manager/admin/src/containers/ListView/index.js 0.00% <ø> (ø)
packages/strapi-admin/services/token.js
packages/strapi-admin/domain/condition.js
packages/strapi-utils/lib/relations.js
packages/strapi/lib/core-api/controller.js
packages/strapi-utils/lib/object-formatting.js
packages/strapi/lib/commands/admin-reset.js
packages/strapi/lib/services/metrics/index.js
... and 125 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a9d648...c85eb46. Read the comment docs.

Signed-off-by: soupette <cyril.lpz@gmail.com>
@soupette soupette changed the title [WIP] Fix inputs display Fix inputs display Dec 21, 2020
@soupette soupette added source: core:content-manager Source is core/content-manager package issue: bug Issue reporting a bug labels Dec 21, 2020
@soupette soupette added this to the 3.4.1 milestone Dec 21, 2020
@@ -118,7 +118,7 @@ function ListView({
const [isFilterPickerOpen, setFilterPickerState] = useState(false);
const [idToDelete, setIdToDelete] = useState(null);
const contentType = layout.contentType;
const hasDraftAndPublish = contentType.options.draftAndPublish;
const hasDraftAndPublish = contentType.options.draftAndPublish || false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The get function of lodash is already imported in this file. Can you use it here, please?

const hasDraftAndPublish = get(contentType, ['options', 'draftAndPublish'], false);

generateUid.current(true);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this is removed? The UID has to be generated if the field is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because when updating a document the field gets regenerated, this solves the issue.

Signed-off-by: soupette <cyril.lpz@gmail.com>
Copy link
Contributor

@HichamELBSI HichamELBSI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug source: core:content-manager Source is core/content-manager package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date field converting to UTC incorrectly
2 participants