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

Remove TODO comments, small fixes to UI lib #321

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/studiocms_ui/src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const { title, description, image, headers: userHeaders } = Astro.props;

const canonicalURL = Astro.site ? new URL(Astro.url.pathname, Astro.site) : undefined;

// TODO: Make this more customizable or move out of UI and into dashboard
// This should probably be removed from the UI lib at some point
const defaultHeaders = headDefaults(title, description, Astro, image, canonicalURL);

const head = createHead(defaultHeaders, userHeaders || []);
Expand Down
2 changes: 1 addition & 1 deletion packages/studiocms_ui/src/components/Button/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

position: relative;

/* TODO: Move gaps & radii to spacings.css */
/* Move gaps & radii to spacings.css later on */
gap: 0.5rem;

outline: none;
Expand Down
2 changes: 0 additions & 2 deletions packages/studiocms_ui/src/components/Dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ class DropdownHelper {

const isMobile = window.matchMedia('screen and (max-width: 840px)').matches;

// TODO: Figure out dropdowns on mobile: 100% of parent
// On desktop: max-width: min-content;
const {
bottom,
left,
Expand Down
1 change: 0 additions & 1 deletion packages/studiocms_ui/src/components/Sidebar/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class SingleSidebarHelper {
class DoubleSidebarHelper {
sidebarsContainer: HTMLElement;

// TODO: Rework into similar to single sidebar
constructor() {
const sidebarsContainer = document.getElementById('sidebars');

Expand Down
5 changes: 3 additions & 2 deletions packages/studiocms_ui/src/components/User/User.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import './User.css';

import { Image } from 'astro:assets';
import Icon from '../../utils/Icon.astro';

type Props = {
Expand All @@ -14,9 +15,9 @@ const { name, description, avatar, class: className } = Astro.props;
---
<div class="user-container" class:list={[ className ]}>
<div class="avatar-container">
<!-- TODO: Astro Image or Unpic? -->
<!-- Astro Image or Unpic -->
{avatar ? (
<img src={avatar} class="avatar-img" />
<Image src={avatar} inferSize alt={name} class="avatar-img" />
) : (
<Icon name='user' width={32} height={32} />
)}
Expand Down
3 changes: 1 addition & 2 deletions packages/studiocms_ui/src/css/resets.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ code {
overflow-wrap: anywhere;
}

/* TODO: Move to layout & add mono font */
code {
font-family: var(--__sl-font-mono);
font-family: monospace;
}

button {
Expand Down