visual-framework / vf-core Goto Github PK
View Code? Open in Web Editor NEWA (primarily CSS) framework that targets needs of life science websites and services
Home Page: https://stable.visual-framework.dev/
License: Apache License 2.0
A (primarily CSS) framework that targets needs of life science websites and services
Home Page: https://stable.visual-framework.dev/
License: Apache License 2.0
The example text for vf-text--body-r
is "extra regular" and vf-text--body-l
is "extra large". Presumably this should just be "regular" and "large"?
@markboulton has reworked the grid system (specifically the embl-grid
) so that it has:
embl-grid--variant
that has the initial column and three equally sized columns.I've worked on a quick demo in codepen.
Some questions, thoughts around this:
As found with the initial Cancer landing page I believe the embl-grid
also needs to denote the columns with their own naming convention. We have discussed this in #13
Because the grid could also be used for long form article content - the `vf-container__heading' doesn't make sense as a name because the column contains meta information regarding the article (author, date, categories, etc).
I think we're also potentially 'limiting' the vf-container__sidebar
with the term too - especially as on smaller devices there is not 'sidebar'.
I propose the column naming convention inside the embl-grid should therefore be:
vf-container__prime
vf-container__main
vf-container__extra
Other things to consider:
We will need to amend the vf-grid and vf-page-grid to use the same generic grid gutter spacing.
Blocks, Containers, Elements, Design System, Components, Visual Framework...
I think it would be a good idea to have a page of terms that explain what they are and what they mean when they're discussed within the Visual Framework.
We will be adopting the branch naming convention previously used:
type/good-name
but we should clarify the type
a little better. In the aim to have this documented somewhere.
feature
- to be used when working on a new component. Is feature
the right word here, maybe new-item
or something?fix
- to be used for ... fixes. Do we want to split this and add hot-fix
for things for the master
branch?docs
- for anything to do with documentation. Content or code.updates
- when we update anything - is this a good enough term? What about refactor
as that is mainly that updates
have been used for.Are there any more we can think of?
To make it a little easier and consistent we should look at adopting some templates for issues and pull requests.
As it stands, the grid system has a 16px gap betwixt any columns.
When using the embl-grid it looks (to me) like it's a little tight, considering the space we give the content (vertically) to breath.
Do we need to take another look at the grid-column-gap
for the embl grid with header, with sidebar, and with both?
This really needs some design input.
As the version of a pattern can be important, we should show it in the web interface.
I know this is set/incremented by lerna in pacakge.json
and I believe Fractal would need a version number stated in the pattern.config.yml
...
Options:
pattern.config.yml
... tedious and error prone!We need to create/replicate the GDPR data protection banner for use across all EMBL sites.
Currently the pattern can be found here.
the existing pattern uses data attributes for the recreating the content using the CSS content
selector.
This does not get read by screen readers (VO on MacOS tested), so we need to use 'actual content' moving forward. I don't see this as a problem? A WP plugin(?) could be created for just this thing? For example.
Also from an accessibility (a11y) viewpoint it needs to be near the top of the DOM on page load, so this is something we would need to add to documentation for people who would be implementing this.
What:
List out our core user types
Why:
As we enter the alpha releases we should start getting wider consensus on the approaches of the VF (note this is seperate from the EMBL brand).
So we should have some kind of governance, documented procedures, and some sort (or advisory group) that provides feedback and buyin, and results in some sort of documentation on:
So we need to:
At some point, I thought it was a good idea to add a little padding to the iframe (I think it's mainly because I don't like the border).
Looking at certain patterns - that choice looks completely silly. This should be removed.
package.json
includes:
"repository": {
"type": "git",
"url": "https://git.VF.de/grp-stratcom/visual-framework-tooling-prototype.git"
}
Referencing old/unreachable repo.
For the vf-badge pattern, I don't think we need:
.vf-badge--square {
...
display: inline-block;
..
}
vf-core/components/vf-badge/vf-badge.scss
Line 46 in 8d45fde
Causes vertical alignment issues and letter the --square
inherit display: inline-flex;
seems ok, or am I missing why it needs to be inline-block
?
We need to make sure we start adding visual regression tests so that we confidently update patch, minor, and breaking changes.
As we will also be hosting a CDN version of the styles.css
and scripts.js
file that will depend on the file path altering when we make a major version change we need to include VRTs as part of the develop and/or build step(s).
There are several resources for this, both paid and completely open-source. I have used [BackstopJS[(https://garris.github.io/BackstopJS/) previously.
Is this something that can be part of the CI build?
Looking at the landing page sketch file there is a thin, light grey, vertical rule when a container has a sidebar.
This should be some fun pseudo class CSS - as, surprise surprise, CSS Grid does not let you do this easily.
now we've moved to GitHub can we use something like this - https://github.com/github-changelog-generator/github-changelog-generator - and automate the release notes a little more?
UPDATE: Released https://github.com/visual-framework/vf-core/releases/tag/v2.0.0-alpha.1
2018 is ending so it's probably time to cut our first alpha of the VF 2.0. Let's aim to try and get these done by Wednesday (19th) and cut the release on Thursday.
v2.0.0-alpha.2
(#108)Alpha 1 represents the beginning of the end for the exploration of how the VF 2.0 should be built to achieve its aims.
A modular, compatible framework for life science websites and services. Need to know more? Read this
As the first alpha has massive amounts of change, we won't present a detailed changelog, but rather some high level notes on where we are and what got us here.
This is our first alpha and captures the first step on a road ... we still have much to do everywhere ranging from patterns, documentation, guides, technical tooling, governance and so on.
πSee a full list of issues and branches in the alpha.1 milestone
master
master
A slot is a full-width component that:
In a few words, what does this pattern look like?
A coloured bar with text, link, buttons at the top or bottom of the page.
In a few words, what does this pattern do?
It relays information regarding the page and/or website. This message can either be permanent or dismissible.
Can other websites use this pattern? Or is it only useful in your organisation or website?
Yes
Do you have any designs or concepts?
We already have this in place as the data protection banner
Have you done any user testing already?
no
How often do you expect to make use of this pattern?
This will be used for the data protection banner (as it is now) but also for permanent messages - like 'this page is an alpha'
Can you list out major elements in this pattern?
text,
link,
button
Will all elements of this pattern be used every time?
the buttons would only be used if it's a dismissible component.
Does this pattern contain other patterns?
vf-data-protection-banner,
Somehow we lost the code that use the CDN on deploy, need to bring it back.
We still have yet to come up with our approach to supporting React, Angular, [insert framework here].
There's probably some inspiration to be had from IBM's Carbon: https://next.carbondesignsystem.com/getting-started/developers/other-frameworks
Will the Carbon Design System support other frameworks in future?
We are open to the idea of providing core support for additional frameworks in future. We added Angular support in the summer of 2018.
For the Carbon Design System to incorporate additional frameworks into our core offering, those frameworks need clear, guaranteed, ongoing resources to maintain and support that option. If a team built a product using a Carbon version of Vue.js, for example, but had no plan to support that solution outside of their product, that couldnβt become a core part of the Carbon Design System.
After some initial research, thinking, and reflecting on what services are asking of us. Maybe the best approach will be to:
βοΈ That thinking loops me back into focusing on two big priorities:
steps taken to get to this:
git fetch origin
git reset --hard origin/develop
npm prune
npm install
gulp dev
navigate to the vf-summary pattern
expected behaviour:
clicking on a variant shows that variant
clicking on a resource tab shows that file
neither work
For EMBL, we have a who-what-where concept that we can use to template the logic for the navigation in the masthead and breadcrumbs, and enable cross-silo exploration.
A lot of this is still in my head and has been explored with many in the Comms team in separate conversations ... so a task for me to put together some functional code to explore this.
In bullets:
embl-content-meta-properties
patternembl-content-meta-properties
patternembl-meta-breadcrumbs
(?) patternvf-masthead
, but that could wait for the next alpha of the patternembl-meta-breadcrumbs
patternFollowing up on some issues with tabs (#123) it raises a question about how much JS we should be writing... is there some sort of lightweight framework that can do things like tabs for us?
Here's what we'd need:
Taking a look at the landing page demo we can see that the intended vf-body
class is not on the <body>
element.
At the moment there are a few things that rely on this (vf-global-header
) for one.
Because of this - there's two options
As we cannot rely on it being on the body, remove it and adjust the vf-grid and embl-grid accordingly
Make it a requirement that the <body>
has a vf-body
class tacked on to it.
Do something else.
Picking back up on issue #28 ("Do we publish patterns independently or as part of one big release?") which went a bit sprawling.
I think we've agreed that the patterns and vf-core can be published independently, so now the main question is how do we version the two aspects?
The status quo of versioning:
[email protected]
the "build environment" for the pattern library, gulp and sass config follows largely semantic versioning from a v2.0.0
start.[email protected]
the patterns being incremented from v0.0.0
with the intention of semantic versioning.[email protected]
For users rolling custom look/feel there will probably be some started template like this based off a trimmed version of vf-core
and should probably follow the vf-core
versioning ... [email protected]
is based off [email protected]
[email protected]
will only appear on the next release, say, [email protected]
. This should be a non-issue as people won't be intended to clone the vf-core
repo, rather to clone vf-child-theme-template
and then pick whichever pattern+version from npm.A table to illustrate where we're thinking/at:
Baseline | ||
---|---|---|
Does its own thing (v0.0.0) | Coupled to vf-core (v2.0.0+) | |
vf-core | β | |
vf-child-theme-template | β | |
vf-pattern-x | β |
vf-core
? For example if in, say, [email protected]
we:
.config.yml
?If patterns are based off v0.0.0
then they would need to note any compatibility issues, a la:
[email protected]
is compatible with[email protected]
[email protected]
requiresvf-core@^2.1.x
[email protected]
requires patternvf-pattern-y@^8.1.0
To me, I'm not seeing a hard reason why we can't go with the above, de-coupling of pattern version from vf-core versions.
Through several discussions via slack, zoom, etc we discusses changing the terms of the embl-grid as well as the sections available in a container.
A container is one (of many) vertical 'strip(s)' of a page.
It can have a header, main, and aside section.
So we would rename the grid options as follows:
embl-grid--with-label
== embl-grid--with-header
embl-grid--with-sidebar
== embl-grid--with-aside
embl-grid--labeled-with-sidebar
== embl-grid--with-header-and-aside
This then has three 'sub containers' within a container to easily position things on the grid.
vf-container__header
vf-container__main
vf-container__aside
In full we would have mark up like this:
<section class="vf-container vf-news-container | embl-grid embl-grid--with-header-and-aside">
<div class="vf-container__header"></div>
<div class="vf-container__main"></div>
<div class="vf-container__aside"></div>
</section>
Fractal allows you to pick and choose if you want to hide folders and things that have a .config.yml
file by having a hidden: true/false
in the frontend matter of the .yml
Since changing templates - this is no longer working.
Now that we've begun to implement the vf-data-protection-banner, it surfaces some thoughts that will be common across many types of messages on sites:
Each of those might be sub-tickets...
The <hr class="vf-divider">
looks too dark, this could be because it is 2px high.
It also not 100% wide of it's containing box. This looks wrong when used, for example:
The idea is to put all components on npm as their own little npm package.
This way users of the VF can pick and choose what to install rather than the whole kitchen sink.
To get the ball rolling I am unsure if we really need every component on NPM?
We would need the basics: the Sass variables, maps, functions, mixins as well as Elements as they're needed for blocks and containers...
But do we need all blocks and containers?
What would be a good, small set of components to start adding to test the water of this?
Fractal is great at allowing many ways to expose variants to the component library.
We are currently creating a separate .hbs
for any variants and, when applicable, setting the collation to true
in the overarching config.yml
file for the component.
For something like buttons (everything starts with buttons) it would be better to continue with what we have done with buttons.
.hbs
files.collated: true
in the config.yml
file.buttons-example.hbs
file.hidden: true
except for - name: examples
in the `config.yml file.component-examples.hbs
make use of {{render '@component'}}
for each variant.This allows us to create a better designed 'list' of the variants. Adding 'inline' documentation where needed rather than leaving it possibly missed in the README.md
which lies underneath the iframe.
We will be making use of Lerna to help publish the components of the visual framework to NPM.
One decision that needs making...
Do we allow each component to be published independently?
ie: if we update the buttons we can push the new version of that package up with it's version bump
Or do we publish the component library as a whole(fixed)?
ie: if we update the buttons we push a version bump to all packages.
A part from 'hot fixes', would it be better for our audience to 'schedule' releases (in time) which means a 'publishing as a whole' would work better?
Another idea is we could start with indepentently (as we're in alpha) and move to fixed when the VF is at Beta or live?
As dicussed in #126 (review)
The js for vf-tabs will generate an error if matching html isn't found:
The code (vf-tabs.js#L5)
const tablist = tabbed.querySelector('.vf-tabs__list');
Can result it (when no tab pattern is present):
Uncaught TypeError: Cannot read property 'querySelector' of null
You can see it anywhere the script.js is being used.
I'm not quite sure the best way to deal with exiting when no content found, but probably something like:
(function() {
// Get relevant elements and collections
const tabbed = document.querySelector('.vf-tabs');
const tabbedContent = document.querySelector('.vf-tabs-content');
if (tabbed === null || tabbedContent === null) {
console.log('tabs or content not found'); // we probably need a vfIfDebugOn?
return;
}
const tablist = tabbed.querySelector('.vf-tabs__list');
const tabs = tablist.querySelectorAll('.vf-tabs__link');
...
At the moment the vf-tags pattern is all in one .hbs
file. We need to:
config.yml
file..hbs
filesvf-tags--examples.hbs
file similar to the vf-buttons-examples.hbs
fileOne month after alpha.1
, alpha.2
is here and brings new features, patterns, more documentation, fixes, optimisations and more, on a relatively settled architecture.
As the second alpha has much change (though far less than alpha.1
), we won't present a detailed changelog, but rather some high level notes on where we are and what got us here.
alpha.3
we expect to have a better approach for where global and local patterns showpackage.json
in vfConfig
mixin set-type
are now more flexible #141vf-child-template
is now availablevf-banner
pattern is much improved and allows more modular control of look, JS dismissal and cookie-based hiding of seen messagesπSee a full list of issues and branches in the alpha.2 milestone
Alpha release are planned for the last Thursday of each month.
vf-child-template
vf-inlay
patternπ See all issues tagged for alpha.3
develop
to master
master
Currently the max-width is 80em it needs to be 81.25 with additional 16px grid-gap
This also means we need to remove the left and right grid items on displays that are ???px and below so that we don't get left and right padding being, effectively, double.
At the moment most, if not all, patterns have 'hard coded' content/data into the patterns .hbs
file.
To make it easier for developers using the visual framework it would be better to move any of this content/data to the .yml file that each component has.
{{> '@component'}}
rather than {{render '@component'}}
questions:
do we want to start making use of any handlebars sugar for {{each}}
for anything like lists?
Now that we're planning regular release we should:
master
develop
to dev.assets.emblstatic.net/vf/
master
to assets.emblstatic.net/vf/
master
to assets.emblstatic.net/vf/{tag}
assets.emblstatic.net/vf/v2.0.0-alpha.1
This was already partly discussed in #28
Add a one sentence summary of what it is you need it to do.
[An image gallery that shows one large image+caption, and thumbnails of more images. Clicking any image starts a slideshow]
In a few words, what does this pattern look like?
[An image gallery with big impact]
In a few words, what does this pattern do?
[Allows users to browse images, possibly clicking on links]
Would a rebrand change the structure or layout of this pattern?
[Possibly we could move from one main image to a grid of images]
Can other websites use this pattern? Or is it only useful in your organisation or website?
[Others could use]
Do you have any designs or concepts?
[yes, they're attached]
Have you done any user testing already?
[no]
How often do you expect to make use of this pattern?
[fairly often, not on every page, but we expect many EMBL teams and some news articles could use this]
Can you list out major elements in this pattern?
[main image, caption+links, credit+link, thumbnails, lightbox and navigation elements]
Will all elements of this pattern be used every time?
[Generally yes]
Does this pattern contain other patterns?
[vf-credit, vf-caption]
So far we have used z-index in three places:
vf-form__input
vf-masthead
vf-data-protecion-banner
These are based on my novel way of using z-index but I think we should move towards something that makes use of Sass, it's variables, functions, and maps.
Something like this
So that we call the z-index with a function that references the map of variables.
I guess for now, we only need to look at the ones we currently have, and we can add and adapt as the component library fills out a little more.
Thoughts?
Would be good if we can increase the width of the pattern library's pattern preview area to be [--- full width --] and escape the grid and pinch of the sidebar.
I'll work up a PR and some screenshots.
Add a one sentence summary of what it is you need it to do.
[An image gallery that shows one large image+caption, and thumbnails of more images. Clicking any image starts a slideshow]
In a few words, what does this pattern look like?
[An image gallery with big impact]
In a few words, what does this pattern do?
[Allows users to browse images, possibly clicking on links]
Would a rebrand change the structure or layout of this pattern?
[Possibly we could move from one main image to a grid of images]
Can other websites use this pattern? Or is it only useful in your organisation or website?
[Others could use]
Do you have any designs or concepts?
[yes, they're attached]
Have you done any user testing already?
[no]
How often do you expect to make use of this pattern?
[fairly often, not on every page, but we expect many EMBL teams and some news articles could use this]
Can you list out major elements in this pattern?
[main image, caption+links, credit+link, thumbnails, lightbox and navigation elements]
Will all elements of this pattern be used every time?
[Generally yes]
Does this pattern contain other patterns?
[vf-credit, vf-caption]
In the code we have quite a bit of // @if $global-font-family != $vf-typography--monospace {
logic that we've stopped using.
I think there are two paths:
Thoughts?
This should help with onboarding and just be useful in general. Probably for the README.md.
Probably we'd want to use tree
, here's a command I got to in a few minutes:
tree -L 2 . -I 'node_modules|cache|test_*|.git|.github|bin' -a
Which gives (+some manual annotation)
βββ .editorconfig
βββ CHANGELOG.md
βββ CONTRIBUTING.md
βββ README.md
βββ SETTINGUP.md
βββ assets (your global Sass assembly file)
βΒ Β βββ scss
βββ build (dynamic folder used for rendering of static pattern library)
βββ components (all the components you wish to use)
βΒ Β βββ _previews (templates for the web pattern browser)
βΒ Β βββ vf-activity-group
...
βΒ Β βββ vf-video-teaser
βββ docs (documentation files for the web interface)
βΒ Β βββ changelog
βΒ Β βββ guidelines
βββ fractal.js (configuration for the web pattern library)
βββ gulpfile.js
βββ lerna.json
βββ package.json
βββ public (dynamic folder used for rendering of global CSS, JS, pattern assets)
βββ tools
βββ component-generator (make new components)
βββ css-generator (build requirement)
βββ frctl-mandelbrot-embl-subtheme (embl web interface)
βββ frctl-mandelbrot-vf-subtheme ( vanilla web interface)
βοΈ this is probably less important for the vf-core
and more so for the child theme template.
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.