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

OUTLINE-165: Creating ready to develop placeholders for upcoming components #414

Merged
merged 18 commits into from
Aug 14, 2023

Conversation

himerus
Copy link
Contributor

@himerus himerus commented Aug 10, 2023

Description

  • Create stub for outline-core-image.
  • Create stub for outline-core-card.
  • Create stub for outline-core-icon.
  • Create stub for outline-core-container.
  • Create stub for outline-core-alert.
  • Create stub for outline-core-form.
  • Create stub for outline-core-text (styled text).
  • Create stub for outline-core-accordion.
  • Create stub for outline-core-youtube.
  • Create stub for outline-core-breadcrumb.
  • Create stub for outline-core-list
  • Create stub for outline-core-modal.

Patterns

outline-core-*.ts Component file:

import { html, TemplateResult, CSSResultGroup } from 'lit';
import { customElement } from 'lit/decorators.js';

// Our base component, which all others extend.
import { OutlineElement } from '@phase2/outline-core';

import componentStyles from './outline-core-image.css.lit';

/** The element name, reused throughout the codebase */
const componentName = 'outline-core-image';

/**
 *
 * The Outline Core Image component
 *
 * @element outline-core-image
 * @extends OutlineElement
 * @slot - The default slot for this element.
 *
 * @todo: Complete component.
 * @todo: Update `../docs/outline-core-image.mdx` to accurately document the component.
 * @todo: Run `yarn analyze` to generate README.md.
 * @todo: Update `package.json` to remove the `private` flag.
 * @todo: Update `.changeset/config.json` to remove this component from the `ignore` list.
 * @todo: Create PR for updated and completed component.
 */
@customElement(componentName)
export class OutlineCoreImage extends OutlineElement {
  static styles: CSSResultGroup = [componentStyles];

  render(): TemplateResult {
    return html`
      <slot></slot>
    `;
  }
}

declare global {
  interface HTMLElementTagNameMap {
    [componentName]: OutlineCoreImage;
  }
}

Basic folder structure:

  • component-name - Top level component directory
    • docs - Folder for documentation
      • component-name.mdx - MDX formatted documentation
    • src
      • config.ts - Shared configuration for this and other components
      • component-name.ts - The component file, declaring the Class and component itself
      • component-name.css - The CSS styling for the component
    • index.ts - The default exported file, with any component exports, variable, exports, etc.
    • package.json - The required NPM configuration, scripts and dependencies
    • tsconfig.build.json - TypeScript configuration that extends the base one

@himerus himerus added Difficulty: Average Severity: High Type: Component Suggestion Use this label for any issue that is a recommendation for a specific type of component. Needs Work NEW PACKAGE A Pull Request that creates a new NPM package to be released. labels Aug 10, 2023
@himerus himerus self-assigned this Aug 10, 2023
@changeset-bot
Copy link

changeset-bot bot commented Aug 10, 2023

⚠️ No Changeset found

Latest commit: ec02013

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify
Copy link

netlify bot commented Aug 10, 2023

Deploy Preview for outlinejs ready!

Name Link
🔨 Latest commit ec02013
🔍 Latest deploy log https://app.netlify.com/sites/outlinejs/deploys/64d66be9cdbcb00008be928d
😎 Deploy Preview https://deploy-preview-414--outlinejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@himerus himerus changed the title feat(outline-core-image): Initial component stub. OUTLINE-165: Creating ready to develop placeholders for upcoming components Aug 10, 2023
@himerus himerus marked this pull request as draft August 10, 2023 19:39
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The following Is what updates the system to look for .mdx file inside any Outline component in the packages directory.

Due to the nature of some of the components, we should adopt a policy to utilize a docs folder PER component to make the glob for looking for the MDX files much easier.

@himerus himerus requested review from shaal and glitchgirl August 11, 2023 16:08
@himerus himerus requested a review from bardleb August 11, 2023 16:08
@himerus himerus marked this pull request as ready for review August 11, 2023 17:12
@himerus himerus merged commit e771e92 into next Aug 14, 2023
@himerus himerus deleted the feature/component-stubs branch August 14, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Average NEW PACKAGE A Pull Request that creates a new NPM package to be released. Severity: High Type: Component Suggestion Use this label for any issue that is a recommendation for a specific type of component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant