Giter VIP home page Giter VIP logo

bluprint_graphics-rig's People

Contributors

chriscanipe avatar fcage avatar hobbes7878 avatar jayvolr avatar man-shar avatar matthewwebertr avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

doc22940

bluprint_graphics-rig's Issues

Deprecating features toward slimmer LTS version

We're onboarding folks to Sveltekit with a bit of pace now.

I think I want to take the opportunity to deprecate some of the more complicated features in this rig for non-standard projects that are better handled by the new kit.

Thinking:

  • Translation
  • Pre-rendering
  • more??

Would also love to move more out of the bin in favour of functions in graphics-bin and ultimately use graphics-kit-publisher for all publishing logic.

Publishing new locales validation error

So Jon, i'm writing this as bookkeeping so i remember what this was when you are back

in bin/graphicsServer/index.js

this logic test:

if (updateOnly) {
  await graphic.updateGraphicEditions();
} else if (createOnly) {
  await graphic.createGraphicEditions();
// This else shouldn't ever run b/c we always call w/ args
} else {
  await graphic.createGraphicEditions();
  await graphic.updateGraphicEditions();
}

is resolving on the createOnly option.

then in graphicPack.js it's going to end in THIS function

async createPack() {
  if (this.graphicId) return;
  this.client = new ServerClient(this.credentials);
  await this.client.createGraphic(this.metadata);
  this.graphicId = this.client.graphic.id;
  setPkgProp('reuters.graphicId', this.graphicId);
}

that will test for this.graphicId, find one and just return

So when you get to the createEditions function in that file, you will come to this line, which expects a this.client

const editions = await this.client.createEditions(`${locale}.zip`, fileBuffer, this.editions.metadata);

but you will not have one, because createPack just returned. You need the logic of the updatePack function to have run:

const { username, password, apiKey } = this.credentials;
this.client = new ServerClient({
  username,
  password,
  apiKey,
  graphic: {
    id: this.graphicId,
  },
});
await this.client.updateGraphic(this.metadata);

i couldn't figure out how the arguments in index.js were being passed in to adjust for this scenario, so to fudge i just dumped the updatePack lines into the createEditions function, but i'm sure there is a simpler way to adjust the logic test in index.js.

Adding custom methods to d3 won't work without explicitly importing the node build

So Gurman found a nifty bug...

She was trying to add some custom methods onto the d3 global.

import * as d3 from 'd3';

d3.selection.prototype.newMethod = () => ...

newMethod would work in dev but with a warning. But when we built, it was gone.

The solution was to explicitly import the node build of d3:

import * as d3 from 'd3/dist/d3.node.js';

... but this feels hacky AF.

Putting this ticket here for anyone to tell me a better way...

Bulk optimise images

Using the runner img-otimiser to optimise multiple files simultaneously to specified dimensions

Converting ArchieML to Apple News Format

We should invest in a script to convert the JSON of text returned by runner get-google in conjunction with the metadata.json file to create an apple news format of articles.

this would require, to some degree, standardizing as many of the keys used in Archie as possible.

I would imagine there would be room for bespoke keys that could be ignored, but things like text, photo, headline, dek, et cetera should be pulled and formatted by default.

A default set of styles should be written and attached.

This could vastly expidite the process of building apple news versions of stories.

Attaching an example of the assets delivered for capitol mob piece.
reuters-crisis-at-the-capitol-anf.zip

BUG: Child frame container width

Add this to style rules

body.child-frame{
	    .container{
        width:100% !important;
        padding-left:0px;
        max-width:100% !important;
    }
}

Fix ai2html check

We should fix this up so folks are automatically getting our latest ai2html script:

https://github.com/reuters-graphics/bluprint_graphics-rig/blob/master/bin/checkAi2html/index.js

Two things, though:

  1. Since it appears people are running more than one version of Illustrator, I think we need to walk/glob the applications directory and find ALL versions they have installed. So the SCRIPT in constants here should really be an array of locations and we'll install to all of them.

  2. Since we'll have to enter a password each time we want to write to that directory on our managed machines, we should read the contents of the file if it already exists, and if it's the same as the latest, just skip it.

Assigning this to you @manas271196 'cause you are the involuntary king of ai2html :) but I'm around to help work out the details of the above.

Accessibility checks for images and graphics

Images should always have alt attributes Decorative images like section breakers or logos should have empty alt attributes.

Graphics sections should always have an aria-describedby attribute linked to another element on the page with text and that ID.

Preferably check these before build and prompt for missing.

More research TK: @AditiBhandariTR

Fix publish for new locales...

... need to create dummy editions when new locales are added. Right now this is being skipped if a pack ID is found. Need to also check for an edition ID per locale.

Also be sure not to update pack details with locale metadata.

Add update date prompt

Add a little script that's just a prompt and ticks that update date over when the user says it's an update.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.