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

#307 new page to display recent messages #375

Merged
merged 10 commits into from
Jan 5, 2023

Conversation

jojopirker
Copy link
Contributor

Initial implementation for #307.
Looks like this now:
Screenshot

Unfortunately the flagging currently does not work..

@jojopirker jojopirker marked this pull request as ready for review January 4, 2023 14:38
@jojopirker jojopirker changed the title new page to display recent messages #307 new page to display recent messages Jan 4, 2023
Copy link
Collaborator

@AbdBarho AbdBarho left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

name={`${item.isAssistant ? "Assitant" : "User"}`}
src={`${item.isAssistant ? "/logos/logo.png" : "/images/temp-avatars/av1.jpg"}`}
/>
<Box className={`p-4 rounded-md text-white whitespace-pre-wrap ${bgColor} text-white w-full`}>{item.text}</Box>
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this work in dark mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2023-01-04 at 20 03 13

just had to fix a little bug with the avatars

borderRadius="xl"
className="p-6 shadow-sm"
>
{isLoading ? (
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you please move the isLoading check to the parent component?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen.Recording.2023-01-04.at.20.05.16.mov

sure, i just had it in there to show small spinners... but could also change it to show a loading screen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

now removed... but still looks the same :)

method: "GET",
headers: {
"X-API-Key": process.env.FASTAPI_KEY,
"Content-Type": "application/json",
Copy link
Collaborator

Choose a reason for hiding this comment

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

you arguably don't need content-type of a GET because it has no body.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed it

);
};

MessagesDashboard.getLayout = (page) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this layout used somewhere else? I remember seeing something similar, if you find a similar layout please move it to its own component

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is removed

@rsandb
Copy link
Contributor

rsandb commented Jan 4, 2023

Can you make the padding between the title and div consistent with the widgets on the dashboard?

Copy link
Collaborator

@fozziethebeat fozziethebeat left a comment

Choose a reason for hiding this comment

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

It looks like all the other requested changes have been made. I approve but won't merge until @AbdBarho gets a chance to look again.

@AbdBarho AbdBarho merged commit 165e873 into LAION-AI:main Jan 5, 2023
fozziethebeat added a commit that referenced this pull request Jan 5, 2023
spacing for message dashboard (comment in #375)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants