Skip to content

Commit

Permalink
Remove TODO comments, fix monospace reset, use Astro image for user c…
Browse files Browse the repository at this point in the history
…omponent (#321)
  • Loading branch information
louisescher authored Oct 2, 2024
1 parent 7092e69 commit 2eb2fd8
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
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

0 comments on commit 2eb2fd8

Please sign in to comment.