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

refactor(anchor): remove anchor in favor of router-link #18935

Merged
merged 5 commits into from
Sep 30, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 0 additions & 8 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ ion-alert-controller,method,create,create(options: AlertOptions) => Promise<HTML
ion-alert-controller,method,dismiss,dismiss(data?: any, role?: string | undefined, id?: string | undefined) => Promise<boolean>
ion-alert-controller,method,getTop,getTop() => Promise<HTMLIonAlertElement | undefined>

ion-anchor,shadow
ion-anchor,prop,color,string | undefined,undefined,false,false
ion-anchor,prop,href,string | undefined,undefined,false,false
ion-anchor,prop,rel,string | undefined,undefined,false,false
ion-anchor,prop,routerDirection,"back" | "forward" | "root",'forward',false,false
ion-anchor,css-prop,--background
ion-anchor,css-prop,--color

ion-app,none

ion-avatar,shadow
Expand Down
44 changes: 0 additions & 44 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,24 +252,6 @@ export namespace Components {
*/
'getTop': () => Promise<HTMLIonAlertElement | undefined>;
}
interface IonAnchor {
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
*/
'color'?: Color;
/**
* Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
*/
'href': string | undefined;
/**
* Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
*/
'rel': string | undefined;
/**
* When using a router, it specifies the transition direction when navigating to another page using `href`.
*/
'routerDirection': RouterDirection;
}
interface IonApp {}
interface IonAvatar {}
interface IonBackButton {
Expand Down Expand Up @@ -2906,12 +2888,6 @@ declare global {
new (): HTMLIonAlertControllerElement;
};

interface HTMLIonAnchorElement extends Components.IonAnchor, HTMLStencilElement {}
var HTMLIonAnchorElement: {
prototype: HTMLIonAnchorElement;
new (): HTMLIonAnchorElement;
};

interface HTMLIonAppElement extends Components.IonApp, HTMLStencilElement {}
var HTMLIonAppElement: {
prototype: HTMLIonAppElement;
Expand Down Expand Up @@ -3474,7 +3450,6 @@ declare global {
'ion-action-sheet-controller': HTMLIonActionSheetControllerElement;
'ion-alert': HTMLIonAlertElement;
'ion-alert-controller': HTMLIonAlertControllerElement;
'ion-anchor': HTMLIonAnchorElement;
'ion-app': HTMLIonAppElement;
'ion-avatar': HTMLIonAvatarElement;
'ion-back-button': HTMLIonBackButtonElement;
Expand Down Expand Up @@ -3706,24 +3681,6 @@ declare namespace LocalJSX {
'translucent'?: boolean;
}
interface IonAlertController extends JSXBase.HTMLAttributes<HTMLIonAlertControllerElement> {}
interface IonAnchor extends JSXBase.HTMLAttributes<HTMLIonAnchorElement> {
/**
* The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics).
*/
'color'?: Color;
/**
* Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
*/
'href'?: string | undefined;
/**
* Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
*/
'rel'?: string | undefined;
/**
* When using a router, it specifies the transition direction when navigating to another page using `href`.
*/
'routerDirection'?: RouterDirection;
}
interface IonApp extends JSXBase.HTMLAttributes<HTMLIonAppElement> {}
interface IonAvatar extends JSXBase.HTMLAttributes<HTMLIonAvatarElement> {}
interface IonBackButton extends JSXBase.HTMLAttributes<HTMLIonBackButtonElement> {
Expand Down Expand Up @@ -6153,7 +6110,6 @@ declare namespace LocalJSX {
'ion-action-sheet-controller': IonActionSheetController;
'ion-alert': IonAlert;
'ion-alert-controller': IonAlertController;
'ion-anchor': IonAnchor;
'ion-app': IonApp;
'ion-avatar': IonAvatar;
'ion-back-button': IonBackButton;
Expand Down
24 changes: 0 additions & 24 deletions core/src/components/anchor/anchor.scss

This file was deleted.

71 changes: 0 additions & 71 deletions core/src/components/anchor/anchor.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions core/src/components/anchor/readme.md

This file was deleted.

81 changes: 0 additions & 81 deletions core/src/components/anchor/test/basic/index.html

This file was deleted.

58 changes: 0 additions & 58 deletions core/src/components/anchor/test/standalone/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion core/src/utils/test/modes/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ test('component: modes', async () => {
// components that need to have the mode class
// added for external / user styling
// e.g. <ion-badge class="md">
tags = ['ion-action-sheet', 'ion-alert', 'ion-anchor', 'ion-app', 'ion-avatar', 'ion-back-button', 'ion-backdrop', 'ion-badge', 'ion-button', 'ion-buttons', 'ion-card-content', 'ion-card-header', 'ion-card-subtitle', 'ion-card-title', 'ion-card', 'ion-checkbox', 'ion-chip', 'ion-col', 'ion-content', 'ion-datetime', 'ion-fab', 'ion-fab-button', 'ion-fab-list', 'ion-footer', 'ion-grid', 'ion-header', 'ion-icon', 'ion-img', 'ion-infinite-scroll', 'ion-infinite-scroll-content', 'ion-input', 'ion-item', 'ion-item-divider', 'ion-item-group', 'ion-item-option', 'ion-item-options', 'ion-item-sliding', 'ion-label', 'ion-list', 'ion-list-header', 'ion-loading', 'ion-modal', 'ion-menu', 'ion-menu-button', 'ion-menu-toggle', 'ion-note', 'ion-picker', 'ion-picker-column', 'ion-popover', 'ion-progress-bar', 'ion-radio', 'ion-radio-group', 'ion-range', 'ion-refresher', 'ion-refresher-content', 'ion-reorder', 'ion-reorder-group', 'ion-ripple-effect', 'ion-row', 'ion-searchbar', 'ion-segment', 'ion-segment-button', 'ion-select', 'ion-select-option', 'ion-select-popover', 'ion-skeleton-text', 'ion-slide', 'ion-slides', 'ion-spinner', 'ion-split-pane', 'ion-tab-bar', 'ion-tab-button', 'ion-text', 'ion-textarea', 'ion-thumbnail', 'ion-title', 'ion-toast', 'ion-toggle', 'ion-toolbar'];
tags = ['ion-action-sheet', 'ion-alert', 'ion-app', 'ion-avatar', 'ion-back-button', 'ion-backdrop', 'ion-badge', 'ion-button', 'ion-buttons', 'ion-card-content', 'ion-card-header', 'ion-card-subtitle', 'ion-card-title', 'ion-card', 'ion-checkbox', 'ion-chip', 'ion-col', 'ion-content', 'ion-datetime', 'ion-fab', 'ion-fab-button', 'ion-fab-list', 'ion-footer', 'ion-grid', 'ion-header', 'ion-icon', 'ion-img', 'ion-infinite-scroll', 'ion-infinite-scroll-content', 'ion-input', 'ion-item', 'ion-item-divider', 'ion-item-group', 'ion-item-option', 'ion-item-options', 'ion-item-sliding', 'ion-label', 'ion-list', 'ion-list-header', 'ion-loading', 'ion-modal', 'ion-menu', 'ion-menu-button', 'ion-menu-toggle', 'ion-note', 'ion-picker', 'ion-picker-column', 'ion-popover', 'ion-progress-bar', 'ion-radio', 'ion-radio-group', 'ion-range', 'ion-refresher', 'ion-refresher-content', 'ion-reorder', 'ion-reorder-group', 'ion-ripple-effect', 'ion-router-link', 'ion-row', 'ion-searchbar', 'ion-segment', 'ion-segment-button', 'ion-select', 'ion-select-option', 'ion-select-popover', 'ion-skeleton-text', 'ion-slide', 'ion-slides', 'ion-spinner', 'ion-split-pane', 'ion-tab-bar', 'ion-tab-button', 'ion-text', 'ion-textarea', 'ion-thumbnail', 'ion-title', 'ion-toast', 'ion-toggle', 'ion-toolbar'];

const globalMode = await page.evaluate(() => document.documentElement.getAttribute('mode'));
for (const tag of tags) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/utils/test/modes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
<ion-content>
<ion-action-sheet></ion-action-sheet>
<ion-alert></ion-alert>
<ion-anchor></ion-anchor>
<ion-avatar></ion-avatar>
<ion-backdrop></ion-backdrop>
<ion-badge></ion-badge>
Expand Down Expand Up @@ -85,6 +84,7 @@
<ion-reorder-group></ion-reorder-group>
<ion-reorder></ion-reorder>
<ion-ripple-effect></ion-ripple-effect>
<ion-router-link></ion-router-link>
<ion-row></ion-row>
<ion-searchbar></ion-searchbar>
<ion-segment-button></ion-segment-button>
Expand Down