Skip to content

Commit

Permalink
remove HeadTags from core components
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-burel committed Sep 28, 2022
1 parent e1a9759 commit 345ab21
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 98 deletions.
4 changes: 4 additions & 0 deletions docusaurus/docs/vulcan-meteor-legacy/features/head-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: Head Tags
---

/!\ In Vulcan Next and Vulcan NPM,
we don't provide Head Tags anymore,
because modern frameworks already provide their own solution at app-level

You'll often need to add tags to your app's `<head>` section. There are three ways to do this: using the [Helmet](https://github.com/nfl/react-helmet) library, using the `<Components.HeadTags/>` component, or using the `Head` object.

## Helmet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FormattedMessage } from "@vulcanjs/react-i18n";
import { Button, Loading, HeadTags, TooltipTrigger, Alert } from "../../core";
import { Button, Loading, TooltipTrigger, Alert } from "../../core";

import {
defaultCoreComponents,
Expand All @@ -19,6 +19,5 @@ export const liteCoreComponents: Partial<PossibleCoreComponents> = {
// i18n
FormattedMessage,
// core
HeadTags,
TooltipTrigger,
};
5 changes: 4 additions & 1 deletion packages/react-ui-lite/components/core/HeadTags.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/**
* @deprecated HeadTags are not exposed anymore,
* copy paste this logic and adapt to your app if you need HeadTags
*/
import React, { PureComponent } from "react";
import PropTypes from "prop-types";
// import { Helmet } from 'react-helmet';
// import { registerComponent, Utils, getSetting, registerSetting, Head } from 'meteor/vulcan:lib';
// import compose from "recompose/compose";
Expand Down
1 change: 0 additions & 1 deletion packages/react-ui-lite/components/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { Button } from "./Button";
export { Loading } from "./Loading";
export { HeadTags } from "./HeadTags";
export { TooltipTrigger } from "./TooltipTrigger";
export { Alert } from "./Alert";
1 change: 0 additions & 1 deletion packages/react-ui/components/VulcanComponents/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export interface PossibleCoreComponents {
// TODO: define props more precisely
MutationButton: any; //React.ComponentType<MutationButtonProps>;
LoadingButton: React.ComponentType<any>;
HeadTags: React.ComponentType<any>;
// Previously from Bootstrap and Mui
TooltipTrigger: React.ComponentType<any>;
Dropdown: React.ComponentType<any>;
Expand Down

2 comments on commit 345ab21

@vercel
Copy link

@vercel vercel bot commented on 345ab21 Sep 28, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

vulcan-npm – ./

vulcan-npm-vulcan.vercel.app
vulcan-npm.vercel.app
vulcan-npm-git-main-vulcan.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 345ab21 Sep 28, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

vulcan-docs – ./docusaurus

vulcan-docs.vercel.app
vulcan-docs-vulcan.vercel.app
vulcan-docs-git-main-vulcan.vercel.app

Please sign in to comment.