Skip to content

Commit dbf0781

Browse files
authored
Merge pull request #530 from Ajay-aot/bugfix/FWF-4441-release-changes
FWF-4441-release custom theming changes to develop
2 parents 24e9060 + dc3baea commit dbf0781

File tree

9 files changed

+58
-12
lines changed

9 files changed

+58
-12
lines changed

forms-flow-admin/src/components/users/users.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@
4646

4747
.success {
4848
color: var(--color-success);
49+
}
50+
.popover{
51+
font-family: var(--primary-font) !important;
4952
}

forms-flow-nav/src/root.component.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import PropTypes from "prop-types";
1010
export default function Root(props) {
1111
const customLogoPath = StyleServices?.getCSSVariable("--custom-logo-path");
1212
const customTitle = StyleServices?.getCSSVariable("--custom-title");
13-
const customLogoAlignment = StyleServices?.getCSSVariable("--custom-logo-horizontal-align");
13+
const customLogoAlignment = StyleServices?.getCSSVariable("--custom-logo-horizontal-align")?.toLowerCase();
1414
const logoAlignmentClass = useMemo(() => {
1515
switch (customLogoAlignment) {
1616
case "left":
@@ -39,6 +39,9 @@ export default function Root(props) {
3939
}, []);
4040

4141
useEffect(() => {
42+
if (hasMultitenancyHeader) {
43+
StyleServices?.setCSSVariable("--client-nav", "3rem");
44+
}
4245
const headerHeight = headerRef.current?.offsetHeight || 0;
4346
const totalHeight = `calc(100% - ${headerHeight}px)`;
4447
setSidenavHeight(totalHeight);

forms-flow-nav/src/sidenav/Sidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const Sidebar = React.memo(({ props, sidenavHeight="100%" }) => {
8181
const tenantKey = tenant?.tenantId;
8282
const formTenant = form?.tenantKey;
8383
const [showProfile, setShowProfile] = useState(false);
84-
const hideLogo = StyleServices?.getCSSVariable("--hide-formsflow-logo");
84+
const hideLogo = StyleServices?.getCSSVariable("--hide-formsflow-logo")?.toLowerCase();
8585
const { t } = useTranslation();
8686
const currentLocation = useLocation();
8787

forms-flow-nav/src/sidenav/Sidebar.scss

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@
6666
margin-bottom: 0.5rem;
6767

6868
&:first-of-type > .accordion-header .accordion-button {
69-
border-top-left-radius: none;
70-
border-top-right-radius: none;
69+
border-top-left-radius: 0 !important;
70+
border-top-right-radius: 0 !important;
71+
}
72+
&:last-of-type > .accordion-header .accordion-button.collapsed {
73+
border-bottom-left-radius: 0 !important;
74+
border-bottom-right-radius: 0 !important;
7175
}
7276
}
7377

@@ -210,7 +214,7 @@
210214
}
211215

212216
.multitenancy-logo {
213-
height: 1.5rem;
217+
height: var(--custom-logo-height) !important;
214218
margin-right: 0.5rem;
215219
}
216220

forms-flow-service/src/helpers/styleService.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ class StyleServices {
77
const value = getComputedStyle(element).getPropertyValue(variableName);
88
return value === '" "' ? "" : value;
99
}
10+
11+
// Set CSS variable utility
12+
public static setCSSVariable(
13+
variableName: string,
14+
value: string,
15+
element: HTMLElement = document.documentElement
16+
): void {
17+
element.style.setProperty(variableName, value);
18+
}
1019
}
1120

1221
export default StyleServices;

forms-flow-theme/scss/_forms.scss

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ select option:hover {
253253

254254
&:focus {
255255
outline: 1px solid $primary;
256+
box-shadow: none !important;
256257
}
257258

258259
&::placeholder {
@@ -269,6 +270,7 @@ select option:hover {
269270
&:focus {
270271
outline: 1px solid $danger-color !important;
271272
border: 1px solid $danger-color !important;
273+
box-shadow: none !important;
272274
}
273275
}
274276

@@ -406,6 +408,19 @@ select option:hover {
406408
transform: translate(-50%, -50%) !important;
407409
}
408410
}
411+
&:focus{
412+
box-shadow: none !important;
413+
}
414+
}
415+
416+
.form-check-input[type="checkbox"] {
417+
border-color: $primary !important;
418+
&:checked{
419+
background-color: $primary !important;
420+
}
421+
&:focus{
422+
box-shadow: none !important;
423+
}
409424
}
410425

411426
.valiation-astrisk {
@@ -665,3 +680,16 @@ select option:hover {
665680
}
666681
}
667682

683+
.btn-danger{
684+
background-color: var(--default-danger-color) !important;
685+
}
686+
687+
div.text-danger,
688+
p.text-danger,
689+
i.text-danger,
690+
span.text-danger,
691+
.btn-link.text-danger,
692+
.modal-title.text-danger {
693+
color: var(--default-danger-color) !important;
694+
}
695+

forms-flow-theme/scss/_theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ $theme-colors: map-merge($theme-colors, $custom-colors);
8383
--default-font-size: 1rem;
8484
--default-font-color: #{$gray-dark};
8585
--navbar-width: 192px;
86+
--custom-logo-height: 1.5rem;
8687

8788
//no-code colors
8889
--no-code-success: #{$no-code-success};
@@ -140,7 +141,7 @@ $theme-colors: map-merge($theme-colors, $custom-colors);
140141
--radius-lg: 1.59375rem; //25.5px
141142
--radius-modal: 1.5rem; //24px
142143
//custom
143-
--client-nav: 3rem;
144+
--client-nav: 0px;
144145
--header-close-btn: 4.625rem;
145146
--default-danger-color: #FF4242;
146147
}

forms-flow-theme/scss/_variables.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ hr {
209209
background: $gray-light;
210210
margin-left: var(--navbar-width);
211211
margin-top: 0;
212-
height: 100vh !important;
212+
height: calc(100vh - var(--client-nav)) !important;
213213
}
214214

215215
.min-container-height {

forms-flow-theme/scss/external/formio.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,9 @@ $gray-dark: var(--ff-gray-dark);
147147
}
148148
}
149149
}
150-
.formio-component {
151-
.formio-component-hidden{
152-
padding-top: 0;
153-
}
154-
}
150+
.formio-component-hidden{
151+
padding-top: 0 !important;
152+
}
155153
}
156154

157155
.ace_scrollbar-h {

0 commit comments

Comments
 (0)