Skip to content

Commit

Permalink
fix styling errors
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminshafii committed Dec 25, 2024
1 parent 30ef93f commit ade507e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 166 deletions.
10 changes: 5 additions & 5 deletions packages/plugin/views/assistant/inbox-logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
LogEntry,
Action,
FileStatus,
} from "../../../inbox/services/record-manager";
} from "../../inbox/services/record-manager";
import moment from "moment";
import {
ChevronDown,
Expand All @@ -18,8 +18,8 @@ import {
Calendar,
} from "lucide-react";
import { motion, AnimatePresence } from "framer-motion";
import { usePlugin } from "../provider";
import { Inbox } from "../../../inbox";
import { usePlugin } from "./provider";
import { Inbox } from "../../inbox";

// Add a tooltip component for error details
const ErrorTooltip: React.FC<{ error: LogEntry["error"] }> = ({
Expand Down Expand Up @@ -524,14 +524,14 @@ const SearchBar: React.FC<SearchBarProps> = ({
return (
<div className="bg-[--background-primary] p-4 rounded-lg border border-[--background-modifier-border] space-y-3">
{/* Search input row */}
<div className="relative flex-1">
<div className="pl-10 relative flex-1">
<Search className="w-4 h-4 absolute left-3 top-1/2 transform -translate-y-1/2 text-[--text-muted]" />
<input
type="text"
placeholder="Search files, tags, or actions..."
value={searchQuery}
onChange={handleSearchChange}
className="w-full pl-9 pr-4 h-min py-2 bg-[--background-secondary] rounded border border-[--background-modifier-border] text-sm"
className="w-full pl-10 pr-4 h-min py-2 bg-[--background-secondary] rounded border border-[--background-modifier-border] text-sm"
/>
</div>

Expand Down
13 changes: 11 additions & 2 deletions packages/plugin/views/assistant/organizer/chunks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export const AtomicNotes: React.FC<DocumentChunksProps> = ({ plugin, activeFile

return (
<div className="document-chunks">
<button onClick={parseDocument} disabled={loading}>
<button
onClick={parseDocument}
disabled={loading}
className="bg-accent text-accent-foreground px-2 py-1"
>
{loading ? "Parsing..." : "Parse Document"}
</button>
{concepts.map((concept, index) => (
Expand All @@ -48,7 +52,12 @@ export const AtomicNotes: React.FC<DocumentChunksProps> = ({ plugin, activeFile
.map((chunk, chunkIndex) => (
<div key={chunkIndex} className="chunk-container">
<p>{chunk.content}</p>
<button onClick={() => addToInbox(concept, chunk.content)}>Add to Inbox</button>
<button
className="bg-accent text-accent-foreground px-2 py-1"
onClick={() => addToInbox(concept, chunk.content)}
>
Add to Inbox
</button>
</div>
))}
</div>
Expand Down
152 changes: 0 additions & 152 deletions packages/plugin/views/assistant/organizer/classification.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const RefreshButton: React.FC<RefreshButtonProps> = ({ onRefresh }) => {
}}
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
className="text-accent shadow-sm"
className="text-accent shadow-sm px-2 py-1"
onClick={handleRefresh}
disabled={loading}
>
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin/views/assistant/organizer/organizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TFile, WorkspaceLeaf, Notice } from "obsidian";
import FileOrganizer from "../../../index";
import { debounce } from "lodash";

import { SectionHeader } from "./components/section-header";
import { SectionHeader } from "../section-header";
import { SimilarTags } from "./tags";
import { AtomicNotes } from "./chunks";
import { RenameSuggestion } from "./titles/box";
Expand Down Expand Up @@ -173,7 +173,7 @@ export const AssistantView: React.FC<AssistantViewProps> = ({
}

return (
<div className="">
<div className="flex flex-col gap-4">
<div className="flex gap-3 items-center ">
<RefreshButton onRefresh={refreshContext} />
<div className="text-accent">{activeFile.basename}</div>
Expand Down
8 changes: 4 additions & 4 deletions packages/plugin/views/assistant/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import * as React from "react";
import { Root, createRoot } from "react-dom/client";
import { AssistantView } from "./organizer/organizer";
import FileOrganizer from "../..";
import { InboxLogs } from "./components/inbox-logs";
import { SectionHeader } from "./components/section-header";
import { InboxLogs } from "./inbox-logs";
import { SectionHeader } from "./section-header";
import { AppContext } from "./provider";
import AIChatSidebar from "./ai-chat/container";

Expand Down Expand Up @@ -77,7 +77,7 @@ function TabButton({
);
}

function OrganizerContent({
function AssistantContent({
plugin,
leaf,
initialTab,
Expand Down Expand Up @@ -185,7 +185,7 @@ export class AssistantViewWrapper extends ItemView {
<AppContext.Provider value={{ plugin: this.plugin, root: this.root }}>
<React.StrictMode>
<div className="h-full ">
<OrganizerContent
<AssistantContent
plugin={this.plugin}
leaf={this.leaf}
initialTab={this.activeTab}
Expand Down

0 comments on commit ade507e

Please sign in to comment.