scania-digital-design-system / sdds Goto Github PK
View Code? Open in Web Editor NEW[deprecated] Scanias legacy design system implementation (sdds-)
Home Page: https://tegel.scania.com
License: MIT License
[deprecated] Scanias legacy design system implementation (sdds-)
Home Page: https://tegel.scania.com
License: MIT License
Describe the bug
-- 'defineCustomElements' is deprecated.
-- On line '7'
Framework and version
Additional context
-- The components is still working fine
Describe the bug
A clear and concise description of what the bug is.
azure test
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Version of SDDS
E.g 1.0.0
Framework and version
If you use any specific framework please provide information
Application link
Provide link if possible
Desktop information:
Please complete the following information
Smartphone information
Please complete the following information
Additional context
Add any other context about the problem here.
AB#174
Describe the bug
A clear and concise description of what the bug is.
When building a react, angular based on typescript. There is an issue importing the current version of SDDS components/theme.
Workaround exist
https://www.javaer101.com/en/article/18245268.html
To Reproduce
Steps to reproduce the behavior:
You can try the same thing with react application based on typescript
Expected behavior
A clear and concise description of what you expected to happen.
No error
no error with without changing the tsconfig(?)
Screenshots
If applicable, add screenshots to help explain your problem.
Version of SDDS
1.4.0+
Framework and version
If you use any specific framework please provide information
Additional context
Add any other context about the problem here.
There is a workaround with this https://www.javaer101.com/en/article/18245268.html
You can set strict to false in tsconfig
Describe the bug
-- In main.js file; 'defineCustomElements' is deprecated.
-- On line '3'
Framework and version
Additional context
-- The components is still working fine
Describe the bug
Font file Not Found (404) error when using sdds-schema
To Reproduce
<script src="resources/node_modules/@scania/theme-light/dist/light-theme.js"></script>
<script src="resources/node_modules/@scania/components/dist/core.js"></script>
<sdds-theme></sdds-theme>
Screenshots
Font Not Found error in the console
Framework and version
@scania/components": "^1.4.2,
@scania/theme-light": "^2.1.0",
Additional context
Please fix it as early as possible we are implementing Login page using SDDS theme.
The issue is also reproducible in the sample HTML project
https://github.com/scania-digital-design-system/sdds/tree/master/demo/HTML
Describe the bug
Tooltip do not having the correct distance, instead floats on top of the target, in this case, button.
The bug doesn't appear locally, but does in the production preview.
To Reproduce
Use this code: <sdds-button type="primary" id="button-1" text="Button"></sdds-button> <sdds-tooltip placement="top" selector="#button-1" text="Lorem ipsum"></sdds-tooltip>
Expected behavior
The tooltip should have a distance of 8px from the target, in this case, the button
Additional comment
The tooltip works as intended by having the "original" button as the target instead, like <button class="sdds-btn sdds-btn-primary">
What is your feature request?
A clear and concise description of what the feature is. Ex. I'm always frustrated when [...]
Further on we will need more theming options
Describe the solution you'd like
A clear and concise description of what you want to happen.
Additional context
Add any other context or screenshots about the feature request here.
What is your feature request?
A clear and concise description of what the feature is. Ex. I'm always frustrated when [...]
There is, right now, no CI tool added
Describe the solution you'd like
A clear and concise description of what you want to happen.
ideas
Additional context
Add any other context or screenshots about the feature request here.
Might be other tools?
AB#172
What is your feature request?
A clear and concise description of what the feature is. Ex. I'm always frustrated when [...]
Current card is missing following features
Describe the solution you'd like
A clear and concise description of what you want to happen.
Based on figma add those features
Additional context
Add any other context or screenshots about the feature request here.
Describe current situation
Describe current situation
Describe what the current situation and what problem it is causing for this improvement
Right now you can't add no padding + gutterless to combind them in the grid system
We have both no padding and gutterless which removes the padding, but they aren't removing the whole padding if both are used
Describe the improvement
A clear and concise description of what kind of improvement you have in mind.
possibility to add gutterless + no padding class to remove the whole padding
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
Additional context
Add any other context about the suggestion here.
Describe the bug
A clear and concise description of what the bug is.
When using a smaller breakpoint then column used, XXLG on a screen below 1312px, it will not add the padding on left right when the column because full width
To Reproduce
Steps to reproduce the behavior:
code example:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Dark red container
light red col
xxlg on 1312 screen
How it should be is the area between dark red(container) and light red(col)
white area is spacing on a xxlg-16 on bigger screen then 1584px
Version of SDDS
SDDS 1.0.0
Grid 1.0.0-beta
Desktop information:
Please complete the following information
Additional context
Add any other context about the problem here.
Add padding in the full width options in the mixin
Describe current situation
Describe what the current situation and what problem it is causing for this improvement
Right now we are using $content control inside some of the stories (headline as an example) to show code example. This might be causing problems in the future, when showing multiple examples in storybook. We should utilize the controls/templates the correct way https://storybook.js.org/docs/react/essentials/controls
export const Headlines = Template.bind({});
Headlines.args = {
content: `
<h1>Headline</h1>
<h2>Headline</h2>
<h3>A headline for page layouts</h3>
<h4>A headline for page layouts</h4>
<h5>A sub headline, which is most commonly paired with body-01</h5>
<h6>A sub headline, which is most commonly paired with body-02</h6>
<h7>A sub headline, which is most commonly paired with detail-02 </h7>
`
}
Describe the improvement
A clear and concise description of what kind of improvement you have in mind.
Instead we should use the templates more to solve multiple examples,
export const Headlines = coolHeadlineTemplate.bind({});
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
Describe current situation
Describe what the current situation and what problem it is causing for this improvement
textfield improvements
Describe the improvement
A clear and concise description of what kind of improvement you have in mind.
Add textfield options to the textfield component
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
Hi,
We are using these components for the new ICE (External UI).
"@scania/theme-light": "2.1.0",
"@scania/components": "1.4.2",
Now, we did some digging and found that before using these packages this was our build stats:
And after adding the components.
This in turn broke our build pipeline.
Are these sizes to be expected? Is there any tree shaking we can do or did we install these incorrectly or something?
Thanks in advance.
/Erik
Describe the bug
A clear and concise description of what the bug is.
When you have a story with c-theme global="true"
it will remain when changing between stories that doesn't have it
Needs to hard refresh to remove the global true
To Reproduce
Steps to reproduce the behavior:
c-theme global="true"
c-theme
without global trueExpected behavior
A clear and concise description of what you expected to happen.
That every example is isolated, doesn't matter if you use global true or not
Version of SDDS
Latest
Framework and version
If you use any specific framework please provide information
Desktop information:
Please complete the following information
Additional context
Add any other context about the problem here.
Might effect how we want to present stuff, but maybe in our case we will always have it on every example
AB#255
Spacing can be exported as it's own package
Describe current situation
Describe what the current situation and what problem it is causing for this improvement
Under the core folder for foundation, we can't live edit files and see the effected changes directly in the browser.
We need to rebuild to see the change in core/**
Theme is running on gulp that have watchers for the theme/light for example
Describe the improvement
A clear and concise description of what kind of improvement you have in mind.
Somehow make it possbile to rebuild everything under the core/** with storybook running with lerna
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
Describe current situation
Describe what the current situation and what problem it is causing for this improvement
Right now the prefix is .sdds which makes it impossible to use it on variables names.
This also effects the theming in VS code, breaking the theming
Describe the improvement
A clear and concise description of what kind of improvement you have in mind.
Remove . before the prefix name, add it on every class that use the prefix instead
Add the prefix for the variable name
.#{prefix}-class
instead of #{$prefix}-class
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your ideas.
Additional context
Add any other context about the suggestion here.
@import '@scania-sdds/grid/breakpoints';
@media (min-width: $sdds-breakpoint-sm){ .... }
// OR
@media (min-width: var(--sdds-breakpoint-sm)){ ... } // boostrap has this
Possible solution:
Describe the bug
A clear and concise description of what the bug is.
Creating a media rule and using sass variables from grid system doesn't work because the rem isn't the correct value
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Should work to use rem value
Version of SDDS
E.g 1.0.0
All versions in grid package
Desktop information:
Please complete the following information
Additional context
Add any other context about the problem here.
Add mixin for handling screen resolution
Getting an error in browser console as 'Failed to load resource: the server responded with a status of 404 (Not Found)' when I run a web application using SDDS themes and components in .net
To Reproduce
Steps to reproduce the behavior:
<script src="../node_modules/@scania/theme-light/dist/light-theme.js"></script>
<script src="../node_modules/@scania/components/dist/core.js"></script>
<c-navigation>
<a href='/home' slot='primary-items'>home</a>
<a href='/about' class='parent' slot='primary-items' active=''>about</a>
<a href='/profile' class='parent' slot='primary-items'>profile</a>
<a href='/abc' class='parent' slot='primary-items'>abc</a>
<a href='/xyz' class='parent' slot='primary-items'>xyz</a>
<a href='/more' slot='secondary-items'>more</a>
<c-navigation slot='sub' caption='About' target='/about' active=''>
<a href='/about' slot='primary-items' active=''>About 1</a>
<a href='/about2' slot='primary-items'>About 2</a>
<a href='/about3' slot='secondary-items'>About 3</a>
</c-navigation>
<c-navigation slot='sub' target='/profile'>
<a href='/profile' slot='primary-items'>Profile 1</a>
<a href='/profile2' slot='primary-items'>Profile 2</a>
<a href='/profile3' slot='secondary-items'>Profile 3</a>
</c-navigation>
<c-navigation slot='sub' target='/abc'>
<a href='/abc' slot='primary-items'>abc 1</a>
<a href='/abc2' slot='primary-items'>abc 2</a>
<a href='/abc3' slot='secondary-items'>abc 3</a>
</c-navigation>
<c-navigation slot='sub' target='/xyz'>
<a href='/xyz' slot='primary-items'>xyz 1</a>
<a href='/xyz2' slot='primary-items'>xyz 2</a>
<a href='/xyz3' slot='secondary-items'>xyz 3</a>
</c-navigation>
</c-navigation>
<c-content>
<section>
<h3>A Title of the page</h3>
<div class='alert alert-success' role='alert'>
A simple success alert—check it out!
</div>
<button class="sdds-btn sdds-btn-secondary">Secondary Button</button>
</section>
</c-content>
<div class="sdds-container">
<div class="sdds-row">
<div class="sdds-col-xxlg-16 sdds-col-xlg-16 sdds-col-lg-16 sdds-col-md-8 sdds-col-sm-4">
<div>
<sdds-accordion>
<sdds-accordion-item header="First item" affix="prefix" tabindex="1">
This is the panel, which contains associated information with the header. Usually it contains text, set in the same size as the header. Lorem ipsum doler sit amet.
</sdds-accordion-item>
<sdds-accordion-item header="Second Item" affix="prefix" tabindex="2" expanded="true">
This is the panel, which contains associated information with the header. Usually it contains text, set in the same size as the header. Lorem ipsum doler sit amet.
</sdds-accordion-item>
</sdds-accordion>
</div>
</div>
</div>
Expected behavior
Web application Runs displaying the output and there should not be any error messages shown in the browser console.
Actual Behavior
Application Runs but there are error messages in the browser console
Screenshots
![404error](https://user-images.githubusercontent.com/81211310/112109482-a8229400-8bd7-11eb-9702-9f49791e256f.PNG
Version of SDDS
E.g 1.0.0
Framework and version
If you use any specific framework please provide information
Desktop information:
Please complete the following information
Describe the bug
In our current setup DOMContentLoaded gets fired before fixFouc() in defineCustomElements registers the listener. This causes the body visibility to never be set to visible.
To Reproduce
Call defineCustomElements with document.readyState !== loading
Expected behavior
I expect the defineCustomElements() to set the visibilty even if document is ready when calling defineCustomElements()
Version of SDDS
"@scania/components": "1.2.0",
Framework and version
React ^17
"single-spa": "^5.3.1",
Desktop information:
Chrome 88.0.4324.192
OSX 10.15.7
Additional context
Adding a check to document.readyState in @scania/components/dist/collection/index.js:fixFouc() solves this issue. I currently don't have a branch, but i'll embed the code snippet anyway if you want to take a look at it.
function fixFouc() {
var elm = document.createElement('style');
var style = document.createTextNode('body { visibility: hidden; }');
document.head.insertBefore(elm, document.head.firstChild);
elm.appendChild(style);
if (document.readyState !== 'loading') {
// Already ready set visibility
style.nodeValue = 'body { visibility: visible; }';
} else {
document.addEventListener('DOMContentLoaded', function () {
// This timeout is to make sure that IE has time to load
setTimeout(function () {
if (document.querySelector('c-theme')) return;
// Used in case a theme element is not rendered
style.nodeValue = 'body { visibility: visible; }';
});
});
}
}
What is your feature request?
A clear and concise description of what the feature is. Ex. I'm always frustrated when [...]
Adding a connection between azure board to be able to see issue in azure devops
Describe the solution you'd like
A clear and concise description of what you want to happen.
https://github.com/marketplace/actions/github-issues-to-azure-devops
Github action automation
Describe the bug
When using Vite (https://vitejs.dev) as bundler for a Vue3 project will SDDS generate errors which stops rendering of the page.
ReferenceError: require is not defined
at @scania_components.js:1726
at async initializeComponent (@scania_components.js:1421) undefined
consoleError @ index-5cfef938.js:1713
index-5cfef938.js:1366 Uncaught (in promise) TypeError: Cannot read property 'isProxied' of undefined
at initializeComponent (@scania_components.js:1424)
The same code works fine in a Vue3 project using Vue CLI.
To Reproduce
Demo project can be found here: https://gitlab.scania.com/sssmzb/sdds-vue3-vite (internal)
Expected behavior
SDDS in combination with Vue3 should be possible to bundle with Vite.
Screenshots
If applicable, add screenshots to help explain your problem.
Version of SDDS
"@scania/components": "^1.4.2",
"@scania/theme-light": "^2.1.0",
Framework and version
"vue": "^3.0.5"
"vite": "^2.1.5"
Repo link
https://gitlab.scania.com/sssmzb/sdds-vue3-vite
Desktop information:
Chrome 89
$spacing-layout-72 needs to be added to typography package
AB#191
Describe the bug
_Auto focus on input field not working when using @scania/components/dist/core.js
To Reproduce
Steps to reproduce the behavior:
<input type="text" id="username" name="username" autofocus></input>
Version of SDDS
"@scania/components": "^1.5.0",
"@scania/theme-light": "^2.2.0",
Framework and version
HTML project
Browser information:
All browser
Additional information:
Please fix it as soon as possible we need to have autofocus on username field in login form.
What is your feature request?
Today it is not possible to use the data binding provided by Angular in the input text component (NgModel).
Describe the solution you'd like
Integrate the Web Component into forms on Angular projects using Control Value Accessors that acts as a bridge between the component and the Angular forms API, allowing you to use ngModel, form validation, and the like with the component.
Additional context
https://github.com/kensodemann/blogs/blob/master/stencil/Using%20ngModel%20with%20Stencil%20Components.md
https://stackoverflow.com/questions/45659742/angular4-no-value-accessor-for-form-control/45659791
Describe the bug
A clear and concise description of what the bug is.
On mac
After certain amount of time/or rebuilds, the node gets an error. Shown in the screenshot
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Not crash
If applicable, add screenshots to help explain your problem.
Version of SDDS
E.g 1.0.0
sdds 1.0.0
Lerna problem?
Desktop information:
Please complete the following information
Additional context
Add any other context about the problem here.
Picture from Figma for Button and icon used at the same time. Icon is on the right. I think this style is missing.
- Can be added on next release
- Please add a note / issue if added in next release
Originally posted by @mmexvr in #101 (comment)
Describe current situation
Current theme component has c-theme naming
Describe the improvement
Should be updated to sdds-theme
Check other components that needs update now.
(Wait for header & navigation)
Describe current situation
Describe what the current situation and what problem it is causing for this improvement
There is no storybook story for the grid system
Describe the improvement
A clear and concise description of what kind of improvement you have in mind.
Add a storybook story for the whole gridsystem
Regular
Push
Gutterless
No padding
Offset
column options
...
Spacing story added
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
AB#173
Describe current situation
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
AB#182
Describe current situation
Button in fullbleed and has icon, the styling is incorrect
Describe the improvement
If a button is fullbleed and has an icon, the text and icon should be center-aligned and the spacing between text and icon is 8px
Screenshots
If applicable, add screenshots to help explain your ideas.
Additional context
Add any other context about the suggestion here.
Describe the bug
-- Some performance issues, happens when scaling the running Vue browser window.
To Reproduce
Framework and version
Desktop information:
Describe current situation
We will add SDDS styles to the theme and remove all old bootstrap styles
Describe the improvement
Describe current situation
On disabled state we have default cursor
Describe the improvement
On disabled state for all components, should show not-allowed cursor.
Describe the bug
-- On line 38 in components/main/Main.js, the "a" element doesn't href to anything, and React doesnt like that. If a dummy link
is set with href=, like "/" or "/#", the disabled breadcrumb doesn't get "disabled", and becomes clickable.
To Reproduce
-- Pull down the project
-- Initiate the project
-- npm start
-- Open file components/main/Main.js
Framework and version
-- Framework: React
Describe current situation
c-theme file is under "patterns" folder in theme project
Describe the improvement
c-theme should belongs to core, since it is a core that contains all components classes & styles.
Need to check gulpfile.js to see if it's still added to the store when moved to core
Describe current situation
Describe what the current situation and what problem it is causing for this improvement
There are some improvement that can be made and some ideas that might be good to look into regarding lerna
Describe the improvement
A clear and concise description of what kind of improvement you have in mind.
If applicable, please provide steps to reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your ideas.
Additional context
Add any other context about the suggestion here.
Describe the bug
When components dependency for scania theme linked to local work, storybook failed to start on lerna command "lerna run start --parallel".
Maybe because the build in theme is not done before storybook build.
Notice that when we have @scania-sdds package, everything works fine.
Maybe good to have --stream flag instead.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Theme should be built before storybook with lerna command
Version of SDDS
1.0.0
Desktop information:
Please complete the following information
UnhandledPromiseRejectionWarning: Error: No file for module C:\development\sdds\theme\light\src\styles\core\colour\tokens
Describe the bug
A clear and concise description of what the bug is.
When running npm i i the root folder SDDS, it will remove the scania packages during installation in the package.json in component folder
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Not remove any packages
Version of SDDS
latest
Framework and version
If you use any specific framework please provide information
Application link
Provide link if possible
Desktop information:
Please complete the following information
Additional context
Add any other context about the problem here.
Bug in lerna or in our dev setup
Describe current situation
Performance update can for the popperjs tooltip
Describe the improvement
Regarding this code:
this.target.addEventListener('mouseenter', () => {
this.show = true;
--> TODO fix improve performance in the future, destroy poppers when it's not visible.
--> popperInstance.setOptions({
--> modifiers: [{ name: 'eventListeners', enabled: true }],
--> });
--> popperInstance.update();
});
this.target.addEventListener('mouseleave', () => {
this.show = false;
--> popperInstance.setOptions({
--> modifiers: [{ name: 'eventListeners', enabled: false }],
});
});
};
The color for blue-700 is incorrect
not #16317f
correct #16417f
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Version of SDDS
E.g 1.0.0
Framework and version
If you use any specific framework please provide information
Application link
Provide link if possible
Desktop information:
Please complete the following information
Smartphone information
Please complete the following information
Additional context
Add any other context about the problem here.
AB#175
What is your feature request?
A clear and concise description of what the feature is. Ex. I'm always frustrated when [...]
No possibility to view components for a non developer
Describe the solution you'd like
A clear and concise description of what you want to happen.
Add netlify to view storybook
Additional context
Add any other context or screenshots about the feature request here.
Add commands to handle build on netlify
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.