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

Stylinted Web SDK #243

Merged
merged 4 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-standard"
}
25 changes: 12 additions & 13 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,19 @@ Cypress.Commands.add("check_user_details", (details, userDetails, limits) => {
expect(keyList).to.include(key);
}
}
return;
}
else {
expect(queue.name).to.equal(userDetails.name);
expect(queue.username).to.equal(userDetails.username);
expect(queue.email).to.equal(userDetails.email);
expect(queue.organization).to.equal(userDetails.organization);
expect(queue.phone).to.equal(userDetails.phone);
expect(queue.picture).to.equal(userDetails.picture);
expect(queue.gender).to.equal(userDetails.gender);
expect(queue.byear).to.equal(userDetails.byear);
if (userDetails.custom !== undefined) {
for (const key in userDetails.custom) {
expect(queue.custom[key]).to.equal(userDetails.custom[key]);
}
expect(queue.name).to.equal(userDetails.name);
expect(queue.username).to.equal(userDetails.username);
expect(queue.email).to.equal(userDetails.email);
expect(queue.organization).to.equal(userDetails.organization);
expect(queue.phone).to.equal(userDetails.phone);
expect(queue.picture).to.equal(userDetails.picture);
expect(queue.gender).to.equal(userDetails.gender);
expect(queue.byear).to.equal(userDetails.byear);
if (userDetails.custom !== undefined) {
for (const key in userDetails.custom) {
expect(queue.custom[key]).to.equal(userDetails.custom[key]);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion examples/react/src/Components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Header = (props) => {
}

const getRandomNumber = (min, max) => {
return parseInt(Math.random() * (max - min) + min);
return parseInt(Math.random() * (max - min) + min, 10);
}

return (
Expand Down
32 changes: 16 additions & 16 deletions examples/react/src/Components/styles.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
.link {
text-decoration: none;
padding: 20px;
color: #000;
text-decoration: none;
padding: 20px;
color: #000;
}

.contact {
text-align: center;
text-align: center;
}

.header {
width: 100%;
height: 100px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #cff96b;
width: 100%;
height: 100px;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #cff96b;
}

.email-us {
padding: 20px;
font-size: 20px;
background-color: #cff96b;
border: none;
border-radius: 2px;
}
padding: 20px;
font-size: 20px;
background-color: #cff96b;
border: none;
border-radius: 2px;
}
13 changes: 7 additions & 6 deletions examples/react/src/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
body {
margin: 0;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
margin: 0;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

24 changes: 11 additions & 13 deletions examples/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ a {
font-family: "Basier circle", -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
align-items: center;
background-color: #1a2a39;
color: rgb(255, 255, 255);
color: rgb(255 255 255);
font-size: 12px;
}

Expand All @@ -48,7 +48,6 @@ a {
white-space: nowrap;
border: 0;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}

Expand All @@ -68,14 +67,13 @@ a {
font-size: 10px;
font-weight: 600;
line-height: 1;
padding: 6px 6px;
padding: 6px;
text-align: center;
text-decoration: none #0d172a solid;
text-decoration-thickness: auto;
transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 1px 2px rgba(166, 175, 195, 0.25);
box-shadow: 0 1px 2px rgb(166 175 195 / 25%);
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}

Expand Down Expand Up @@ -115,7 +113,7 @@ a {
width: 80%;
height: 2px;
scroll-behavior: auto;
background-color: rgba(217, 217, 217, 0.803);
background-color: rgb(217 217 217 / 80.3%);
}

@media (min-width: 768px) {
Expand Down Expand Up @@ -145,9 +143,9 @@ a {
position: fixed;
left: 35%;
top: 0%;
box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 0 5px 5px rgb(0 0 0 / 20%);
background-color: white;
border-radius: 2% 2% 2% 2%;
border-radius: 2%;
}

#id-input {
Expand All @@ -162,10 +160,10 @@ a {

#accept-btn {
background-color: #3573ea;
border-radius: 10% 10% 10% 10%;
border-radius: 10%;
border-color: white;
color: white;
padding: 10px 25px 10px 25px;
padding: 10px 25px;
opacity: 1;
width: 80px;
position: relative;
Expand All @@ -174,18 +172,18 @@ a {

#cancel-btn {
background-color: white;
border-radius: 10% 10% 10% 10%;
border-radius: 10%;
border: 0.5px solid #adadad;
color: #3573ea;
padding: 10px 20px 10px 20px;
padding: 10px 20px;
opacity: 1;
width: 80px;
}

#check-box {
display: flex;
align-items: center;
padding: 12px 0 0 0;
padding: 12px 0 0;
}

#accept-btn:hover {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
"eslint-plugin-import": "^2.25.2",
"jsdoc": "^3.6.10",
"markdownlint": "^0.26.0",
"stylelint": "^14.9.1",
"stylelint-config-standard": "^26.0.0",
"webpack": "^5.24.1",
"webpack-cli": "^4.2.0"
},
Expand Down
8 changes: 4 additions & 4 deletions plugin/ga_adapter/ga_adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ Countly Adapter Library for Google Analytics
// ga('send', {hitType:.., ...})
else if (typeof o === "object") {
switch (o.hitType) {
// ga('send', {'hitType':'event', ..})
case "event":
// ga('send', {'hitType':'event', ..})
customSegments = {
category: o.eventCategory
};
Expand Down Expand Up @@ -222,8 +222,8 @@ Countly Adapter Library for Google Analytics
}

break;
// ga('send', {'hitType':'social', ..})
case "social":
// ga('send', {'hitType':'social', ..})
Countly.q.push(["add_event", {
key: o.socialAction,
count: 1,
Expand All @@ -247,8 +247,8 @@ Countly Adapter Library for Google Analytics
}

break;
// ga('send', {'hitType':'timing', ..})
case "timing":
// ga('send', {'hitType':'timing', ..})
Countly.q.push(["add_event", {
key: o.timingVar,
count: 1,
Expand All @@ -267,8 +267,8 @@ Countly Adapter Library for Google Analytics
}]);
}
break;
// ga('send', {'hitType':'pageview', 'page':'page'})
case "pageview":
// ga('send', {'hitType':'pageview', 'page':'page'})
Countly.q.push(["track_pageview", o.page]);
if (window.cly_ga_test_mode) {
window.cly_ga_test_logs.push(["track_pageview", o.page]);
Expand Down