-
Notifications
You must be signed in to change notification settings - Fork 801
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Jetpack AI: show current featured image on modal (#40631)
* add changelog * accept previous images on use-ai-image hook to preload existing image(s), adapt pointer/current refs/states * retrieve current featured image to show on modal, if available. add selector/store types, fix linter issues with types as well * use exported store and type from wordpress/editor * use cleaner types * use a single call for all editorStore selects * split selector to use media ID as dependency to fetch media object * get featured image URL from getEditedPostAttribute * simplify types * Revert "get featured image URL from getEditedPostAttribute" This reverts commit 7e23832. * add debug calls to figure out why modal isn't showing the featured image on first open * move getMedia selector to ai image hook, use selector/useEffect combo to try and get the value * refactor var name to reflect value * rename var so it makes a bit more sense of what it is * set fixed image height on image modal * if we've loaded a previous image, generate a mock image before triggering the generation process * consider libraryId besides image prop to decide and use on image src. Also, change how disabling feedback is evaluated * if image was loaded then consider regenerate * wee fixes on carrousel * remove heavy debugs * remove comments --------- Co-authored-by: Douglas <[email protected]>
- Loading branch information
Showing
6 changed files
with
102 additions
and
42 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
projects/plugins/jetpack/changelog/change-jetpack-ai-featured-image-show-current
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: other | ||
|
||
Jetpack AI: featured image generator modal noww shows current featured image if present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters