Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amundsen_dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Surendar Reddy Mangannagari
amundsen_dev
Commits
b67a9116
Unverified
Commit
b67a9116
authored
Dec 02, 2020
by
Marcos Iglesias
Committed by
GitHub
Dec 02, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed preferences page, not used qanywhere (#803)
Signed-off-by:
Marcos Iglesias
<
miglesiasvalle@lyft.com
>
parent
bb7b69a8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
162 deletions
+0
-162
index.tsx
...static/js/pages/PreferencesPage/PreferenceGroup/index.tsx
+0
-46
constants.ts
..._application/static/js/pages/PreferencesPage/constants.ts
+0
-13
index.tsx
...sen_application/static/js/pages/PreferencesPage/index.tsx
+0
-86
styles.scss
...n_application/static/js/pages/PreferencesPage/styles.scss
+0
-17
No files found.
amundsen_application/static/js/pages/PreferencesPage/PreferenceGroup/index.tsx
deleted
100644 → 0
View file @
bb7b69a8
// Copyright Contributors to the Amundsen project.
// SPDX-License-Identifier: Apache-2.0
import
*
as
React
from
'react'
;
import
{
bindActionCreators
}
from
'redux'
;
import
{
connect
}
from
'react-redux'
;
export
type
PreferenceGroupProps
=
{
onClick
:
(
value
:
string
)
=>
any
;
preferenceValue
:
string
;
selected
:
boolean
;
title
:
string
;
subtitle
:
string
;
};
export
class
PreferenceGroup
extends
React
.
Component
<
PreferenceGroupProps
>
{
public
static
defaultProps
:
Partial
<
PreferenceGroupProps
>
=
{
selected
:
false
,
title
:
''
,
subtitle
:
''
,
};
onClick
=
()
=>
{
this
.
props
.
onClick
(
this
.
props
.
preferenceValue
);
};
// TODO: Consolidate with future common RadioButton component.
render
()
{
return
(
<
label
className=
"preference-group"
onClick=
{
this
.
onClick
}
>
<
input
defaultChecked=
{
this
.
props
.
selected
}
type=
"radio"
className=
"preference-radio"
name=
"notification-preference"
/>
<
div
className=
"preference-text"
>
<
div
className=
"title-2"
>
{
this
.
props
.
title
}
</
div
>
<
div
className=
"body-secondary-3"
>
{
this
.
props
.
subtitle
}
</
div
>
</
div
>
</
label
>
);
}
}
export
default
PreferenceGroup
;
amundsen_application/static/js/pages/PreferencesPage/constants.ts
deleted
100644 → 0
View file @
bb7b69a8
/* TODO: harcoded string that should be translatable/customizable */
export
const
NOTIFICATION_PREFERENCES_TITLE
=
'Notification Preferences'
;
export
const
ALL_NOTIFICATIONS_TITLE
=
'All Notifications'
;
export
const
ALL_NOTIFICATIONS_SUBTITLE
=
'You will get notified via email regarding any activity on tables you own.'
;
export
const
MINIMUM_NOTIFICATIONS_TITLE
=
'Minimum Notifications Only'
;
export
const
MINIMUM_NOTIFICATIONS_SUBTITLE
=
"You will only be notified when you're being added as an owner, removed as an owner, or receive a description request on any table you own."
;
export
const
ALL_PREFERENCE
=
'all-preference'
;
export
const
MINIMUM_PREFERENCE
=
'minimum-preference'
;
amundsen_application/static/js/pages/PreferencesPage/index.tsx
deleted
100644 → 0
View file @
bb7b69a8
// Copyright Contributors to the Amundsen project.
// SPDX-License-Identifier: Apache-2.0
import
*
as
React
from
'react'
;
import
{
bindActionCreators
}
from
'redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
PreferenceGroup
}
from
'./PreferenceGroup'
;
// TODO: Use css-modules instead of 'import'
import
'./styles.scss'
;
import
{
ALL_NOTIFICATIONS_SUBTITLE
,
ALL_NOTIFICATIONS_TITLE
,
ALL_PREFERENCE
,
MINIMUM_NOTIFICATIONS_SUBTITLE
,
MINIMUM_NOTIFICATIONS_TITLE
,
MINIMUM_PREFERENCE
,
NOTIFICATION_PREFERENCES_TITLE
,
}
from
'./constants'
;
// TODO: Implement tests before component is exposed
interface
PreferencesPageState
{
selectedPreference
:
string
;
}
export
interface
DispatchFromProps
{}
export
type
PreferencesPageProps
=
DispatchFromProps
;
export
class
PreferencesPage
extends
React
.
Component
<
PreferencesPageProps
,
PreferencesPageState
>
{
constructor
(
props
)
{
super
(
props
);
this
.
changePreference
=
this
.
changePreference
.
bind
(
this
);
this
.
state
=
{
selectedPreference
:
ALL_PREFERENCE
,
};
}
changePreference
=
(
newPreference
)
=>
{
this
.
setState
({
selectedPreference
:
newPreference
,
});
};
render
()
{
return
(
<
div
className=
"container"
>
<
div
className=
"row"
>
<
div
className=
"col-xs-12 col-md-offset-1 col-md-10"
>
<
h1
className=
"preferences-title"
>
{
NOTIFICATION_PREFERENCES_TITLE
}
</
h1
>
<
PreferenceGroup
onClick=
{
this
.
changePreference
}
preferenceValue=
{
ALL_PREFERENCE
}
selected=
{
this
.
state
.
selectedPreference
===
ALL_PREFERENCE
}
title=
{
ALL_NOTIFICATIONS_TITLE
}
subtitle=
{
ALL_NOTIFICATIONS_SUBTITLE
}
/>
<
PreferenceGroup
onClick=
{
this
.
changePreference
}
preferenceValue=
{
MINIMUM_PREFERENCE
}
selected=
{
this
.
state
.
selectedPreference
===
MINIMUM_PREFERENCE
}
title=
{
MINIMUM_NOTIFICATIONS_TITLE
}
subtitle=
{
MINIMUM_NOTIFICATIONS_SUBTITLE
}
/>
</
div
>
</
div
>
</
div
>
);
}
}
export
const
mapDispatchToProps
=
(
dispatch
:
any
)
=>
{
return
bindActionCreators
({},
dispatch
);
};
export
default
connect
<
DispatchFromProps
>
(
null
,
mapDispatchToProps
)(
PreferencesPage
);
amundsen_application/static/js/pages/PreferencesPage/styles.scss
deleted
100644 → 0
View file @
bb7b69a8
// Copyright Contributors to the Amundsen project.
// SPDX-License-Identifier: Apache-2.0
@import
'variables'
;
.preferences-title
{
margin-bottom
:
72px
;
}
.preference-group
{
display
:
flex
;
margin-bottom
:
32px
;
}
.preference-text
{
margin-left
:
16px
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment