This pull request mainly focuses on improving the user interface and the functionality of the ImageGenerationComponent and Home components in the HelloDallE8 project. The most significant changes include the removal of the label from the FluentTextArea in ImageGenerationComponent, the addition of a GeneratePrompt method, and the restructuring of the layout in the Home component. Additionally, the QuestionsComponent layout and the ImageMetadataState model have been updated.
User Interface Improvements:
src/HelloDallE8/Components/ImageGenerationComponent.razor: The label from the FluentTextArea has been removed and a FluentButton for generating prompts has been added. This button changes its text based on the state of the prompt generation process.
Functionality Improvements:
src/HelloDallE8/Components/ImageGenerationComponent.razor: A GeneratePrompt method has been added, which generates a prompt based on the user's responses. The method also handles exceptions and changes the button text based on the state of the prompt generation process. The SubmitPrompt method has been updated to only handle the submission of the prompt to the AI model. [1][2]
Layout Changes:
src/HelloDallE8/Components/Pages/Home.razor: The layout of the page has been updated to improve the display of the generated questions and the image generation component. The OnInitializedAsync method has also been updated to use the questionsFromGenAI variable instead of questString, and to add the questions to the imageMetadataState object. [1][2][3][4]
src/HelloDallE8/Models/ImageMetadataState.cs: The AddOrUpdateMetadata method has been updated to URL encode the key and value before adding or updating them in the Metadata dictionary.
This pull request mainly focuses on improving the user interface and the functionality of the
ImageGenerationComponent
andHome
components in theHelloDallE8
project. The most significant changes include the removal of the label from theFluentTextArea
inImageGenerationComponent
, the addition of aGeneratePrompt
method, and the restructuring of the layout in theHome
component. Additionally, theQuestionsComponent
layout and theImageMetadataState
model have been updated.User Interface Improvements:
src/HelloDallE8/Components/ImageGenerationComponent.razor
: The label from theFluentTextArea
has been removed and aFluentButton
for generating prompts has been added. This button changes its text based on the state of the prompt generation process.Functionality Improvements:
src/HelloDallE8/Components/ImageGenerationComponent.razor
: AGeneratePrompt
method has been added, which generates a prompt based on the user's responses. The method also handles exceptions and changes the button text based on the state of the prompt generation process. TheSubmitPrompt
method has been updated to only handle the submission of the prompt to the AI model. [1] [2]Layout Changes:
src/HelloDallE8/Components/Pages/Home.razor
: The layout of the page has been updated to improve the display of the generated questions and the image generation component. TheOnInitializedAsync
method has also been updated to use thequestionsFromGenAI
variable instead ofquestString
, and to add the questions to theimageMetadataState
object. [1] [2] [3] [4]Minor Changes:
src/HelloDallE8/Components/QuestionsComponent.razor
: The layout of the component has been updated to improve the display of the question category.src/HelloDallE8/Models/ImageMetadataState.cs
: TheAddOrUpdateMetadata
method has been updated to URL encode the key and value before adding or updating them in theMetadata
dictionary.