Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
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
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
7ec8715b
Commit
7ec8715b
authored
Mar 17, 2022
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused function that was missing types
parent
58e1ccc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
34 deletions
+1
-34
session.js
src/sidebar/helpers/session.js
+0
-11
session-test.js
src/sidebar/helpers/test/session-test.js
+1
-23
No files found.
src/sidebar/helpers/session.js
View file @
7ec8715b
...
...
@@ -5,17 +5,6 @@ import { serviceConfig } from '../config/service-config';
* @typedef {import('../../types/api').Profile} Profile
*/
/**
* Returns true if the sidebar tutorial has to be shown to a user for a given session.
* @deprecated To be removed once preact help/tutorial panel is in place
*/
export
function
shouldShowSidebarTutorial
(
sessionState
)
{
if
(
sessionState
.
preferences
.
show_sidebar_tutorial
)
{
return
true
;
}
return
false
;
}
/**
* The following things must all be true for the tutorial component to auto-display
* on app launch:
...
...
src/sidebar/helpers/test/session-test.js
View file @
7ec8715b
import
*
as
sessionUtil
from
'../session'
;
describe
(
'sidebar/helpers/session'
,
()
=>
{
describe
(
'#shouldShowSidebarTutorial'
,
()
=>
{
it
(
'shows sidebar tutorial if the settings object has the show_sidebar_tutorial key set'
,
()
=>
{
const
sessionState
=
{
preferences
:
{
show_sidebar_tutorial
:
true
,
},
};
assert
.
isTrue
(
sessionUtil
.
shouldShowSidebarTutorial
(
sessionState
));
});
it
(
'hides sidebar tutorial if the settings object does not have the show_sidebar_tutorial key set'
,
()
=>
{
const
sessionState
=
{
preferences
:
{
show_sidebar_tutorial
:
false
,
},
};
assert
.
isFalse
(
sessionUtil
.
shouldShowSidebarTutorial
(
sessionState
));
});
});
describe
(
'#shouldAutoDisplayTutorial'
,
()
=>
{
describe
(
'shouldAutoDisplayTutorial'
,
()
=>
{
[
{
// The only "true" state
...
...
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