Rename to Pollo! Bumped to v5!

This commit is contained in:
Atridad Lahiji 2024-04-09 11:09:51 -06:00
parent 8461d80130
commit b47071957f
No known key found for this signature in database
13 changed files with 101 additions and 106 deletions

View file

@ -1,6 +1,6 @@
# Sprint Padawan ![Status](https://status.atri.dad/api/badge/4/status?upColor=%23d10ace&downColor=%23ff0400&pendingColor=%23ff0400&style=for-the-badge)
# Pollo
A scrum poker tool that helps agile teams plan their sprints in real-time.
A dead-simple real-time voting tool.
## Stack
@ -19,7 +19,3 @@ A scrum poker tool that helps agile teams plan their sprints in real-time.
## Contributing
Feel free to propose changes via PR. I'm not awfully picky about formatting right now, so I'll accept/reject on a case-by-case basis. Please make sure to have an issue first though.
## Stats
![Alt](https://repobeats.axiom.co/api/embed/852f886f9cf9682a5355b574f59716dca985e7cc.svg "Repobeats analytics image")

View file

@ -15,7 +15,7 @@ export default function ErrorPage() {
<h2 className="text-2xl font-bold m-2">
If you believe you reached this page in error, please file an issue{" "}
<a
href="https://github.com/atridadl/sprintpadawan/issues/new"
href="https://github.com/atridadl/pollo/issues/new"
className="link link-secondary"
>
here
@ -41,7 +41,7 @@ export default function ErrorPage() {
<h2 className="text-2xl font-bold m-2">
If you believe you reached this page in error, please file an issue{" "}
<a
href="https://github.com/atridadl/sprintpadawan/issues/new"
href="https://github.com/atridadl/pollo/issues/new"
className="link link-secondary"
>
here
@ -63,7 +63,7 @@ export default function ErrorPage() {
<h2 className="text-2xl font-bold m-2">
If you believe you reached this page in error, please file an issue{" "}
<a
href="https://github.com/atridadl/sprintpadawan/issues/new"
href="https://github.com/atridadl/pollo/issues/new"
className="link link-secondary"
>
here

View file

@ -19,7 +19,7 @@ const Footer = () => {
-{" "}
<a
className="link link-primary link-hover"
href={`https://github.com/atridadl/sprintpadawan/releases/tag/${packagejson.version}`}
href={`https://github.com/atridadl/pollo/releases/tag/${packagejson.version}`}
rel="noreferrer"
target="_blank"
>

View file

@ -16,8 +16,8 @@ import "./tailwind.css";
export const meta: MetaFunction = () => {
return [
{ title: "Sprint Padawan" },
{ name: "description", content: "Plan. Sprint. Repeat." },
{ title: "Pollo" },
{ name: "description", content: "Simple Real-Time Voting" },
];
};
@ -35,7 +35,7 @@ function App() {
<Links />
</head>
<body className="h-[100%] w-[100%] fixed overflow-y-auto">
<Header title={"Sprint Padawan"} />
<Header title={"Pollo"} />
<div className="flex flex-row items-center justify-center min-h-[calc(100%-114px)]">
<Outlet />
</div>

View file

@ -3,7 +3,7 @@ export default function Index() {
<div className="flex flex-col text-center items-center justify-center px-4 py-16 gap-4">
<h1 className="text-3xl sm:text-6xl font-bold">
<span className="bg-gradient-to-r from-primary via-accent to-secondary bg-clip-text text-transparent box-decoration-clone">
Sprint Padawan
Pollo
</span>
</h1>

View file

@ -25,7 +25,7 @@ export async function action({ request, params, context }: ActionFunctionArgs) {
created_at: Date.now().toString(),
userId: userId || "",
roomName: data.name,
storyName: "First Story!",
topicName: "First Topic!",
scale: "0.5,1,2,3,5,8",
visible: false,
})

View file

@ -44,7 +44,7 @@ export async function action({ request, params, context }: ActionFunctionArgs) {
})
),
roomName: oldRoom.roomName,
storyName: oldRoom.storyName,
topicName: oldRoom.topicName,
}));
}
@ -54,23 +54,23 @@ export async function action({ request, params, context }: ActionFunctionArgs) {
const newRoom = data.reset
? await db
.update(rooms)
.set({
storyName: data.name,
visible: data.visible,
scale: [...new Set(data.scale.split(","))]
.filter((item) => item !== "")
.toString(),
})
.where(eq(rooms.id, params.roomId || ""))
.returning()
.update(rooms)
.set({
topicName: data.name,
visible: data.visible,
scale: [...new Set(data.scale.split(","))]
.filter((item) => item !== "")
.toString(),
})
.where(eq(rooms.id, params.roomId || ""))
.returning()
: await db
.update(rooms)
.set({
visible: data.visible,
})
.where(eq(rooms.id, params.roomId || ""))
.returning();
.update(rooms)
.set({
visible: data.visible,
})
.where(eq(rooms.id, params.roomId || ""))
.returning();
const success = newRoom.length > 0;

View file

@ -20,19 +20,19 @@ export const loader: LoaderFunction = async (args) => {
type RoomsResponse =
| {
id: string;
createdAt: Date;
roomName: string;
}[]
id: string;
createdAt: Date;
roomName: string;
}[]
| {
roomName: string | null;
id: string;
created_at: Date | null;
userId: string;
storyName: string | null;
visible: boolean;
scale: string;
}[]
roomName: string | null;
id: string;
created_at: Date | null;
userId: string;
topicName: string | null;
visible: boolean;
scale: string;
}[]
| null
| undefined;

View file

@ -113,7 +113,7 @@ function RoomContent() {
| PresenceItem[]
| undefined;
const [storyNameText, setStoryNameText] = useState<string>("");
const [topicNameText, setTopicNameText] = useState<string>("");
const [roomScale, setRoomScale] = useState<string>("");
const [copied, setCopied] = useState<boolean>(false);
@ -142,7 +142,7 @@ function RoomContent() {
cache: "no-cache",
method: "PUT",
body: JSON.stringify({
name: storyNameText,
name: topicNameText,
visible: data.visible,
scale: roomScale,
reset: data.reset ? data.reset : false,
@ -175,7 +175,7 @@ function RoomContent() {
userId: item.userId,
roomId: item.roomId,
roomName: item.roomName,
storyName: item.storyName,
topicName: item.topicName,
scale: item.scale,
votes: item.votes,
};
@ -186,7 +186,7 @@ function RoomContent() {
userId: roomFromDbParsed.userId,
roomId: roomFromDbParsed.id,
roomName: roomFromDbParsed.roomName,
storyName: storyNameText,
topicName: topicNameText,
scale: roomScale,
votes: votesFromDbParsed?.map((vote) => {
return {
@ -240,7 +240,7 @@ function RoomContent() {
// =================================
useEffect(() => {
if (roomFromDb) {
setStoryNameText(roomFromDbParsed?.storyName || "");
setTopicNameText(roomFromDbParsed?.topicName || "");
setRoomScale(roomFromDbParsed?.scale || "ERROR");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
@ -276,7 +276,7 @@ function RoomContent() {
<div className="card card-compact bg-base-100 shadow-xl">
<div className="card-body">
<h2 className="card-title mx-auto">
Story: {roomFromDbParsed?.storyName}
Topic: {roomFromDbParsed?.topicName}
</h2>
<ul className="p-0 flex flex-row flex-wrap justify-center items-center text-ceter gap-4">
@ -324,13 +324,13 @@ function RoomContent() {
)}{" "}
{presenceItem.userId ===
roomFromDbParsed?.userId && (
<span
className="tooltip tooltip-warning"
data-tip="Room Owner"
>
<CrownIcon className="inline-block text-warning" />
</span>
)}
<span
className="tooltip tooltip-warning"
data-tip="Room Owner"
>
<CrownIcon className="inline-block text-warning" />
</span>
)}
{" : "}
</p>
@ -351,11 +351,10 @@ function RoomContent() {
return (
<button
key={index}
className={`join-item ${
getVoteForCurrentUser()?.value === scaleItem
? "btn btn-active btn-primary"
: "btn"
}`}
className={`join-item ${getVoteForCurrentUser()?.value === scaleItem
? "btn btn-active btn-primary"
: "btn"
}`}
onClick={() => void setVoteHandler(scaleItem)}
>
{scaleItem}
@ -389,15 +388,15 @@ function RoomContent() {
}}
/>
<label className="label">{"Story Name:"} </label>
<label className="label">{"Topic Name:"} </label>
<input
type="text"
placeholder="Story Name"
placeholder="Topic Name"
className="input input-bordered"
value={storyNameText}
value={topicNameText}
onChange={(event) => {
setStoryNameText(event.target.value);
setTopicNameText(event.target.value);
}}
/>
@ -434,8 +433,8 @@ function RoomContent() {
visible: false,
reset: true,
log:
roomFromDbParsed?.storyName === storyNameText ||
votesFromDb?.length === 0
roomFromDbParsed?.topicName === topicNameText ||
votesFromDb?.length === 0
? false
: true,
})
@ -447,8 +446,8 @@ function RoomContent() {
).length <= 1
}
>
{roomFromDbParsed?.storyName === storyNameText ||
votesFromDb?.length === 0 ? (
{roomFromDbParsed?.topicName === topicNameText ||
votesFromDb?.length === 0 ? (
<>
<RefreshCwIcon className="text-xl mr-1" /> Reset
</>

View file

@ -12,7 +12,7 @@ export const rooms = pgTable("Room", {
created_at: text("created_at"),
userId: text("userId").notNull(),
roomName: text("roomName"),
storyName: text("storyName"),
topicName: text("topicName"),
visible: boolean("visible").default(false).notNull(),
scale: text("scale").default("0.5,1,2,3,5").notNull(),
});
@ -58,7 +58,7 @@ export const logs = pgTable(
scale: text("scale"),
votes: text("votes"),
roomName: text("roomName"),
storyName: text("storyName"),
topicName: text("topicName"),
},
(table) => {
return {

View file

@ -13,52 +13,52 @@ export interface PresenceItem {
export type RoomsResponse =
| {
id: string;
createdAt: Date;
roomName: string;
}[]
id: string;
createdAt: Date;
roomName: string;
}[]
| {
roomName: string | null;
id: string;
created_at: Date | null;
userId: string;
storyName: string | null;
visible: boolean;
scale: string;
}[]
roomName: string | null;
id: string;
created_at: Date | null;
userId: string;
topicName: string | null;
visible: boolean;
scale: string;
}[]
| null
| undefined;
export type RoomResponse =
| {
id: string;
created_at: Date | null;
userId: string;
roomName: string | null;
topicName: string | null;
visible: boolean;
scale: string | null;
logs: {
id: string;
created_at: Date | null;
userId: string;
roomId: string;
roomName: string | null;
storyName: string | null;
visible: boolean;
topicName: string | null;
scale: string | null;
logs: {
id: string;
created_at: Date | null;
userId: string;
roomId: string;
roomName: string | null;
storyName: string | null;
scale: string | null;
votes: unknown;
}[];
}
votes: unknown;
}[];
}
| undefined
| null;
export type VoteResponse =
| {
id: string;
value: string;
created_at: Date | null;
userId: string;
roomId: string;
}[]
id: string;
value: string;
created_at: Date | null;
userId: string;
roomId: string;
}[]
| null
| undefined;

BIN
bun.lockb

Binary file not shown.

View file

@ -1,6 +1,6 @@
{
"name": "sprintpadawan",
"version": "4.3.2",
"name": "pollo",
"version": "5.0.0",
"private": true,
"sideEffects": false,
"type": "module",