Skip to content

Commit

Permalink
Reverted button and link roles in anchors for minimal merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
rafawendel committed Feb 25, 2021
1 parent 981e1b8 commit 2b1b24c
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,7 @@ export default function DesktopNavbar() {
)}
{canCreateDashboard && (
<Menu.Item key="new-dashboard">
<a
data-test="CreateDashboardMenuItem"
role="button"
onMouseUp={() => CreateDashboardDialog.showModal()}>
<a data-test="CreateDashboardMenuItem" onMouseUp={() => CreateDashboardDialog.showModal()}>
New Dashboard
</a>
</Menu.Item>
Expand Down Expand Up @@ -185,7 +182,7 @@ export default function DesktopNavbar() {
)}
<Menu.Divider />
<Menu.Item key="logout">
<a data-test="LogOutButton" role="button" onClick={() => Auth.logout()}>
<a data-test="LogOutButton" onClick={() => Auth.logout()}>
Log out
</a>
</Menu.Item>
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/EditInPlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class EditInPlace extends React.Component {
{this.props.value}
</span>
) : (
<a className="clickable" role="link" onClick={this.startEditing}>
<a className="clickable" onClick={this.startEditing}>
{this.props.placeholder}
</a>
);
Expand Down
1 change: 0 additions & 1 deletion client/app/components/FavoritesControl.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default class FavoritesControl extends React.Component {
<a
title={title}
className="favorites-control btn-favorite"
role="button"
onClick={event => this.toggleItem(event, item, onChange)}>
<i className={icon} aria-hidden="true" />
</a>
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/HelpTrigger.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export function helpTriggerWithTypes(types, allowedDomains = [], drawerClassName
</Tooltip>
)}
<Tooltip title="Close" placement="bottom">
<a onClick={this.closeDrawer} role="button">
<a onClick={this.closeDrawer}>
<CloseOutlinedIcon />
</a>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/TagsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function TagsList({ tagsUrl, showUnselectAll = false, onUpdate }: TagsListProps)
<div className="tags-list-title">
<span className="tags-list-label">Tags</span>
{showUnselectAll && selectedTags.length > 0 && (
<a role="button" onClick={unselectAll}>
<a onClick={unselectAll}>
<CloseOutlinedIcon />
clear selection
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ function VisualizationWidgetFooter({ widget, isPublic, onRefresh, onExpand }) {
{!isPublic && !!widgetQueryResult && (
<a
className="refresh-button hidden-print btn btn-sm btn-default btn-transparent"
role="button"
onClick={() => refreshWidget(1)}
data-test="RefreshButton">
<i className={cx("zmdi zmdi-refresh", { "zmdi-hc-spin": refreshClickButtonId === 1 })} />{" "}
Expand All @@ -179,15 +178,11 @@ function VisualizationWidgetFooter({ widget, isPublic, onRefresh, onExpand }) {
{!isPublic && (
<a
className="btn btn-sm btn-default hidden-print btn-transparent btn__refresh"
role="button"
onClick={() => refreshWidget(2)}>
<i className={cx("zmdi zmdi-refresh", { "zmdi-hc-spin": refreshClickButtonId === 2 })} />
</a>
)}
<a
className="btn btn-sm btn-default hidden-print btn-transparent btn__refresh"
role="button"
onClick={onExpand}>
<a className="btn btn-sm btn-default hidden-print btn-transparent btn__refresh" onClick={onExpand}>
<i className="zmdi zmdi-fullscreen" />
</a>
</span>
Expand Down
7 changes: 1 addition & 6 deletions client/app/components/dashboards/dashboard-widget/Widget.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ WidgetDropdownButton.defaultProps = {
function WidgetDeleteButton({ onClick }) {
return (
<div className="widget-menu-remove">
<a
className="action"
title="Remove From Dashboard"
role="button"
onClick={onClick}
data-test="WidgetDeleteButton">
<a className="action" title="Remove From Dashboard" onClick={onClick} data-test="WidgetDeleteButton">
<i className="zmdi zmdi-close" />
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/empty-state/EmptyState.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function EmptyState({
</div>
</div>
{closable && (
<a className="close-button" role="button" aria-label="Close" onClick={onClose}>
<a className="close-button" aria-label="Close" onClick={onClose}>
<CloseOutlinedIcon />
</a>
)}
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/queries/SchedulePhrase.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class SchedulePhrase extends React.Component {
const content = full ? <Tooltip title={full}>{short}</Tooltip> : short;

return this.props.isLink ? (
<a className="schedule-phrase" role="link" onClick={this.props.onClick} data-test="EditSchedule">
<a className="schedule-phrase" onClick={this.props.onClick} data-test="EditSchedule">
{content}
</a>
) : (
Expand Down
2 changes: 1 addition & 1 deletion client/app/pages/data-sources/DataSourcesList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function DataSourcesListComponent({ dataSources, onClickCreate }) {
There are no data sources yet.
{policy.isCreateDataSourceEnabled() && (
<div className="m-t-5">
<a className="clickable" role="link" onClick={onClickCreate} data-test="CreateDataSourceLink">
<a className="clickable" onClick={onClickCreate} data-test="CreateDataSourceLink">
Click here
</a>{" "}
to add one.
Expand Down
2 changes: 1 addition & 1 deletion client/app/pages/destinations/DestinationsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class DestinationsList extends React.Component {
There are no alert destinations yet.
{policy.isCreateDestinationEnabled() && (
<div className="m-t-5">
<a className="clickable" role="link" onClick={this.showCreateSourceDialog}>
<a className="clickable" onClick={this.showCreateSourceDialog}>
Click here
</a>{" "}
to add one.
Expand Down
2 changes: 1 addition & 1 deletion client/app/pages/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function EmailNotVerifiedAlert() {
<>
We have sent an email with a confirmation link to your email address. Please follow the link to verify your
email address.{" "}
<a className="clickable" role="link" onClick={verifyEmail}>
<a className="clickable" onClick={verifyEmail}>
Resend email
</a>
.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function TabWithDeleteButton({ visualizationName, canDelete, onDelete, ...props
<span {...props}>
{visualizationName}
{canDelete && (
<a className="delete-visualization-button" role="button" onClick={handleDelete}>
<a className="delete-visualization-button" onClick={handleDelete}>
<i className="zmdi zmdi-close" />
</a>
)}
Expand Down
2 changes: 1 addition & 1 deletion client/app/pages/query-snippets/QuerySnippetsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class QuerySnippetsList extends React.Component {
There are no query snippets yet.
{policy.isCreateQuerySnippetEnabled() && (
<div className="m-t-5">
<a className="clickable" role="link" onClick={() => this.showSnippetDialog()}>
<a className="clickable" onClick={() => this.showSnippetDialog()}>
Click here
</a>{" "}
to add one.
Expand Down

0 comments on commit 2b1b24c

Please sign in to comment.