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

enhancement: bulk publish migration to v5 #20255

Open
wants to merge 49 commits into
base: v5/main
Choose a base branch
from

Conversation

madhurisandbhor
Copy link
Contributor

@madhurisandbhor madhurisandbhor commented May 3, 2024

What does it do?

Bulk Publish action migrated to v5 without any v5 design changes.

Related issue(s)/PR(s)

⚠️ Merge after #20235 as this is created on top of it

madhurisandbhor and others added 30 commits April 4, 2024 12:35
* chore: migrate bulkDelete to v5

* chore: change findLocales type to accept strings array

* fix: docs prettier styles

* chore: remove console.log
@Marc-Roig
Copy link
Contributor

probably someelse (FE) should approve this pr too :)

},
} = useDocLayout();

const shouldDisplayMainField = mainField != null && mainField !== 'id';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need this variable?

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer to have it because we use twice on the file

* BoldChunk
* -----------------------------------------------------------------------------------------------*/

const BoldChunk = (chunks: React.ReactNode) => <Typography fontWeight="bold">{chunks}</Typography>;
Copy link
Contributor

Choose a reason for hiding this comment

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

at the end the chunks prop is the children prop, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but I think formatMessage pass chunks as the children

Copy link
Contributor

@simotae14 simotae14 left a comment

Choose a reason for hiding this comment

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

just two small comments, I still need to test the code

@simotae14
Copy link
Contributor

I found two strange behaviours, not sure are related to this PR to be honest.
The first one is the alignment of the confirmation message, as you can see the text in red is not aligned with the other message
Schermata 2024-05-27 alle 11 15 42
the second weird behaviour are some warning with message "Not found" that are shown when we switch from a document with entries to another one without entries as you can see in this video

Registrazione.schermo.2024-05-27.alle.11.17.55.mov

@simotae14
Copy link
Contributor

And also some validation error messages have no useful meaning, for example
Schermata 2024-05-27 alle 11 25 29

@Feranchz
Copy link
Contributor

Thanks for the errors @simotae14 !

I discovered a couple of things:

  1. "Not Found" error is on main too, looks like it's related on how we use the useDoc hook, probably we can go with this PR and create a ticket for that error, but before lets take a look at other teams to know if someone else is already taking a look at this
  2. The validation error message is actually two errors:
    a. Error formatting the error message: Solved
    b. The entry object we are using to validate is not nested populated, this means that for this specific case closingPeriod.dish is always throwing an error

For this last one we can create a ticket because it's a more complicated thing and I think is a v4 error too (I remember something similar in Releases which works the same way) 🤔

@madhurisandbhor
Copy link
Contributor Author

madhurisandbhor commented May 28, 2024

New changes on fetching entries on opening modal LGTM, thanks!!
Noticed 2 issues,

  1. modal confirm message for internalisation is not correct, it just needs to be aligned at center.
  2. On refresh selected/ ready to publish entries are not updated.
    https://github.com/strapi/strapi/assets/7886244/15cb4a80-32d5-418b-8c2a-e3610b1abced

Would like to know why don't we use publishedAt value?

@Feranchz
Copy link
Contributor

Would like to know why don't we use publishedAt value?

@madhurisandbhor because right now we have two versions of the entry (the published one and the in draft one). We want to use the one in draft (to validate it) and in this version publishedAt is null (because is in draft), but we want the "status" (which takes in consideration all the versions of the entry).

Actually this change is interesting, probably we want to discuss it more with Yannis

Could you add these two issues you found to the blitz docs? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: enhancement This PR adds or updates some part of the codebase or features source: core:content-manager Source is core/content-manager package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants