Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
400
Merge Requests
56
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
3f3f6fb9
Commit
3f3f6fb9
authored
42 minutes ago
by
Marcelo Rivera
Browse files
Options
Download
(fix): reverted latest experiment changes
parent
1afe3d6f
feat/homepage-redesign
1 merge request
!623
Homepage redesign
Pipeline
#98191955
running with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
53 deletions
+16
-53
src/app/modules/experiments/experiment.directive.spec.ts
View file @
3f3f6fb9
...
...
@@ -17,11 +17,11 @@ import { Storage } from '../../services/storage';
@
Component
({
template
:
`
<div
*mExperiment="'homepage'; bucket
s: ['base']
"
*mExperiment="'homepage'; bucket
: 'base'
"
class="homepage-bucket-base"
></div>
<div
*mExperiment="'homepage'; bucket
s: ['variant1']
"
*mExperiment="'homepage'; bucket
: 'variant1'
"
class="homepage-bucket-variant1"
></div>
`
,
...
...
This diff is collapsed.
src/app/modules/experiments/experiment.directive.ts
View file @
3f3f6fb9
...
...
@@ -14,7 +14,7 @@ import { ExperimentsService } from './experiments.service';
})
export
class
ExperimentDirective
{
@
Input
(
'
mExperiment
'
)
mExperimentId
;
@
Input
()
mExperimentBucket
s
:
Array
<
string
>
;
@
Input
()
mExperimentBucket
;
constructor
(
private
_service
:
ExperimentsService
,
...
...
@@ -23,13 +23,14 @@ export class ExperimentDirective {
)
{}
async
ngOnInit
()
{
if
(
this
.
mExperimentBuckets
.
indexOf
(
'
base
'
)
!==
-
1
)
this
.
_viewContainer
.
createEmbeddedView
(
this
.
_templateRef
);
// load the base first
if
(
this
.
mExperimentBucket
===
'
base
'
)
//load the base first
this
.
_viewContainer
.
createEmbeddedView
(
this
.
_templateRef
);
if
(
await
this
.
_service
.
shouldRender
({
experimentId
:
this
.
mExperimentId
,
bucketId
s
:
this
.
mExperimentBuckets
,
bucketId
:
this
.
mExperimentBucket
,
})
)
{
console
.
log
(
'
clearing
'
);
...
...
This diff is collapsed.
src/app/modules/experiments/experiments.service.ts
View file @
3f3f6fb9
...
...
@@ -5,7 +5,7 @@ import { Storage } from '../../services/storage';
type
ExperimentBucket
=
{
experimentId
:
string
;
bucketId
s
:
Array
<
string
>
;
bucketId
:
string
;
};
@
Injectable
()
...
...
@@ -30,7 +30,7 @@ export class ExperimentsService {
let
bucket
=
this
.
experiments
[
opts
.
experimentId
];
if
(
bucket
)
{
return
opts
.
bucketIds
.
indexOf
(
bucket
)
!==
-
1
;
return
bucket
===
opts
.
bucketId
;
}
if
(
this
.
fetching
)
{
...
...
@@ -40,7 +40,7 @@ export class ExperimentsService {
try
{
this
.
fetching
=
true
;
cons
t
response
:
any
=
await
this
.
client
.
get
(
le
t
response
:
any
=
await
this
.
client
.
get
(
`api/v2/experiments/
${
opts
.
experimentId
}
`
);
bucket
=
response
.
bucketId
;
...
...
@@ -52,6 +52,6 @@ export class ExperimentsService {
this
.
storage
.
set
(
`experiments:
${
opts
.
experimentId
}
`
,
bucket
);
this
.
fetching
=
false
;
return
opts
.
bucketIds
.
indexOf
(
bucket
)
!==
-
1
;
return
bucket
===
opts
.
bucketId
;
}
}
This diff is collapsed.
src/app/modules/homepage/homepage.component.html
View file @
3f3f6fb9
...
...
@@ -8,47 +8,18 @@
>
<h1
i18n
>
Minds
<span
class=
"m-homepage__yellowLine"
></span></h1>
<h2
ngPreserveWhitespaces
*mExperiment=
"'Homepage121119'; buckets: ['base', 'form']"
i18n
>
<h2
ngPreserveWhitespaces
i18n
>
Earn for your ideas
</h2>
<h2
ngPreserveWhitespaces
*mExperiment=
"
'Homepage121119';
buckets: ['base-take-back-control', 'form-take-back-control']
"
i18n
>
Take back control of your social media
</h2>
<p
class=
"m-marketing__description"
i18n
>
Free your mind and get paid for creating content, driving traffic and
referring friends. A place to have open conversations and bring people
together.
</p>
<p
class=
"m-marketing__description"
*mExperiment=
"'Homepage121119'; buckets: ['base', 'form']"
i18n
>
<p
class=
"m-marketing__description"
i18n
>
Take back control of your social media.
</p>
<p
class=
"m-marketing__description"
*mExperiment=
"
'Homepage121119';
buckets: ['base-take-back-control', 'form-take-back-control']
"
i18n
>
Earn for your ideas.
</p>
<button
class=
"mf-button mf-button--alt m-homepage__joinButton"
...
...
@@ -77,10 +48,7 @@
<div
class=
"m-grid__column-5 m-grid__column-5--tablet m-grid__column-12--mobile m-marketing__image"
*mExperiment=
"
'Homepage121119';
buckets: ['base', 'base-take-back-control']
"
*mExperiment=
"'Homepage121119'; bucket: 'base'"
>
<span>
<img
...
...
@@ -92,10 +60,7 @@
<div
class=
"m-grid__column-5 m-grid__column-12--mobile"
*mExperiment=
"
'Homepage121119';
buckets: ['form', 'form-take-back-control']
"
*mExperiment=
"'Homepage121119'; bucket: 'form'"
>
<m-homepage
__registerForm
></m-homepage
__registerForm
>
</div>
...
...
@@ -220,10 +185,7 @@
<div
class=
"m-marketing__section m-marketing__section--tail"
*mExperiment=
"
'Homepage121119';
buckets: ['base', 'base-take-back-control']
"
*mExperiment=
"'Homepage121119'; bucket: 'base'"
>
<div
class=
"m-grid m-marketing__wrapper"
>
<div
class=
"m-grid__column-12 m-marketing__body"
>
...
...
This diff is collapsed.
Please
register
or
sign in
to comment