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

style: created custom tagify scss file and updated gulp file #10063

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
73a497d
created custom tagify scss file and updated gulp file
IsaiahLevy Mar 31, 2024
6a90691
Merge branch 'main' into add-tagify-scss-customization
IsaiahLevy Apr 1, 2024
aa23cad
Merge branch 'main' into add-tagify-scss-customization
IsaiahLevy Apr 2, 2024
9a0467f
styling: update tagify styles
IsaiahLevy Apr 3, 2024
78a1ff6
Merge branch 'openfoodfacts:main' into add-tagify-scss-customization
IsaiahLevy Apr 4, 2024
ddae13e
Merge pull request #2 from openfoodfacts/main
tchen0125 Apr 6, 2024
3fad730
Merge branch 'openfoodfacts:main' into main
andrewhuanggg Apr 8, 2024
8755404
Merge branch 'openfoodfacts:main' into main
andrewhuanggg Apr 11, 2024
336c50d
Merge branch 'openfoodfacts:main' into add-tagify-scss-customization
tchen0125 Apr 11, 2024
5d562cc
created custom tagify scss file and updated gulp file
IsaiahLevy Mar 31, 2024
934d4f0
styling: update tagify styles
IsaiahLevy Apr 3, 2024
cbc1ae6
fixing tagify
IsaiahLevy Apr 11, 2024
30e873f
Merge branch 'main' of https://github.com/ossd-s24/openfoodfacts-serv…
IsaiahLevy Apr 11, 2024
752a5cf
fixing tagify rules
IsaiahLevy Apr 11, 2024
d4cef45
Merge remote-tracking branch 'upstream/main' into add-tagify-scss-cus…
IsaiahLevy Apr 12, 2024
ddbd4a9
resolving merge conflicts
IsaiahLevy Apr 12, 2024
2690f67
removing unrelate changes and updating custom-tagify
IsaiahLevy Apr 18, 2024
bc58995
Merge branch 'main' of https://github.com/openfoodfacts/openfoodfacts…
IsaiahLevy Apr 18, 2024
cdb3458
Merge branch 'main' into add-tagify-scss-customization
IsaiahLevy Apr 19, 2024
4ecf12b
Merge branch 'main' into add-tagify-scss-customization
IsaiahLevy Apr 22, 2024
5628306
Merge branch 'main' into add-tagify-scss-customization
IsaiahLevy Apr 23, 2024
92741a9
Merge branch 'main' into add-tagify-scss-customization
IsaiahLevy Apr 30, 2024
afbee76
Merge branch 'main' into add-tagify-scss-customization
IsaiahLevy May 2, 2024
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
28 changes: 15 additions & 13 deletions gulpfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,21 @@ export function attributesIcons() {
export function css() {
console.log("(re)building css");

return src(sassSrc).
pipe(init()).
pipe(
return src(sassSrc)
.pipe(init())
.pipe(
sass({
errLogToConsole: true,
outputStyle: "expanded",
includePaths: ["./node_modules/foundation-sites/scss"],
}).on("error", sass.logError)
).
pipe(minifyCSS()).
pipe(write(".")).
pipe(dest("./html/css/dist"));
)
.pipe(minifyCSS())
.pipe(write("."))
.pipe(dest("./html/css/dist"));
}


export function copyJs() {
return src([
"./node_modules/@webcomponents/**/webcomponentsjs/**/*.js",
Expand Down Expand Up @@ -133,16 +134,17 @@ function copyCss() {
"./node_modules/leaflet/dist/leaflet.css",
"./node_modules/leaflet.markercluster/dist/MarkerCluster.css",
"./node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",
"./node_modules/@yaireo/tagify/dist/tagify.css",
// "./node_modules/@yaireo/tagify/dist/tagify.css", // This line should be commented out or removed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// "./node_modules/@yaireo/tagify/dist/tagify.css", // This line should be commented out or removed

"./node_modules/cropperjs/dist/cropper.css",
"./node_modules/select2/dist/css/select2.min.css",
]).
pipe(init()).
pipe(minifyCSS()).
pipe(write(".")).
pipe(dest("./html/css/dist"));
])
.pipe(init())
.pipe(minifyCSS())
.pipe(write("."))
.pipe(dest("./html/css/dist"));
}


function copyImages() {
return src(imagesSrc).pipe(dest("./html/css/dist"));
}
Expand Down
2 changes: 2 additions & 0 deletions scss/app-ltr.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import "variables";
@import "custom-tagify";
@import "variables";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"variable" is already imported in line 1. Does it have to be included here, again?

@import "settings";
@import "sveetoy/f5_settings";
@import "foundation";
Expand Down
2 changes: 2 additions & 0 deletions scss/app-rtl.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import "variables";
@import "custom-tagify";
@import "variables";
@import "settings-rtl";
@import "sveetoy/f5_settings";
@import "foundation";
Expand Down
34 changes: 34 additions & 0 deletions scss/custom-tagify.scss
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IsaiahLevy your file has merging problems !

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@import "../node_modules/@yaireo/tagify/src/tagify.scss";
@import "variables";

// Placeholder style for Tagify input
.tagify__input::placeholder {
color: $dark;
}

// Hover state for Tagify tags
.tagify__tag:hover {
background-color: $skyblue;
border-color: lighten($paleblue, 10%);
}

// Style for the remove button in tags
.tagify__tag .tagify__tag__removeBtn {
background-color: $text-color-dark;
}

// Hover state for the remove button in tags
.tagify__tag .tagify__tag__removeBtn:hover {
background-color: $off-pink;
}

// Hover state for dropdown items
.tagify__dropdown__item--active,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this rule does not seems to work, but I don't know why.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thank you for the feedback. Just pushed changes to fix this.

.tagify__dropdown__item:hover {
background-color: $skyblue;
}

// Style for dropdown items
.tagify__dropdown__item {
border-color: $paleblue;
}
1 change: 1 addition & 0 deletions templates/web/common/site_layout.tt.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<link rel="stylesheet" href="[% static_subdomain %]/css/dist/app-[% edq(lang('text_direction')) %].css?v=[% css_timestamp %]" data-base-layout="true">
<link rel="stylesheet" href="[% static_subdomain %]/css/dist/jqueryui/themes/base/jquery-ui.css" data-base-layout="true">
<link rel="stylesheet" href="[% static_subdomain %]/css/dist/select2.min.css">
<link rel="stylesheet" href="[% static_subdomain %]/css/dist/custom-tagify.css" data-base-layout="true">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only really need Tagify in

<link rel="stylesheet" type="text/css" href="/css/dist/tagify.css" />
, so this probably needs to be removed, and the import in cgi/product_multilingual.pl should be updated.

<link rel="search" href="[% formatted_subdomain %]/cgi/opensearch.pl" type="application/opensearchdescription+xml" title="[% edq(lang('site_name')) %]">
[% header %]
<style media="all">
Expand Down
Loading