These are chat archives for arenanet/api-cdi

31st
Oct 2016
still 1 achievement left!
Pat Cavit
@tivac
Oct 31 2016 05:13
oh shit it's @frodesigns
Edgar Doiron
@Coffee4cr
Oct 31 2016 13:12
:point_up_2: :heart_eyes:
Brian Patrick
@frodesigns
Oct 31 2016 17:14
@tivac SFD representing!
Edgar Doiron
@Coffee4cr
Oct 31 2016 17:21
@frodesigns just want to say thanks for the great wvwintel map. It's the page open on my second monitor eveytime I play GW2
Brian Patrick
@frodesigns
Oct 31 2016 18:15
@Coffee4cr Thanks! It means a lot to us devs when people like the things we've made :)
Edgar Doiron
@Coffee4cr
Oct 31 2016 18:20
What's missing, is one of us tackling a gw2skills.net website that uses API so we don't need to update it every patch... since gw2skills.net hasn't been updated in ages
darthmaim
@darthmaim
Oct 31 2016 18:21
i started working on something last weekend
Archomeda
@Archomeda
Oct 31 2016 18:21
yeah... i started last week actually too
Nabrok
@Nabrok
Oct 31 2016 18:21
I think there's still some stuff that would require manual updates.
Archomeda
@Archomeda
Oct 31 2016 18:22
true, but not like the whole skill database hopefully
Nabrok
@Nabrok
Oct 31 2016 18:24
yeah, skill and trait details should be fine. Calculating base stats from gear should be do-able, where it might get tricky is how things like traits and food affect the stats
Archomeda
@Archomeda
Oct 31 2016 18:24
i've got some very basic stuff working atm
chrome_2016-10-31_19-23-38.png
but now i'm fighting to get the actual live specializations working with the way how redux works
at least the gw2e-gw2api-client package is useful @queicherius
but for some odd reason i get {type: "FETCH_ALL_SPECIALIZATIONS", payload: Promise} instead of an actual payload...
@Nabrok i've thought about that, but these stats also exist in the api afaik
Nabrok
@Nabrok
Oct 31 2016 18:32
Something like axe mastery on warrior for example, you'd probably have to hard code a check to see how many axes are equipped.
So you can add the apropriate amount of ferocity
Archomeda
@Archomeda
Oct 31 2016 18:34
hmm seems like it
Archomeda
@Archomeda
Oct 31 2016 18:39
okay, my issue seems an incompatibility between 2 libraries
Archomeda @Archomeda sighs
Archomeda
@Archomeda
Oct 31 2016 18:50
oh
i'm stupid
these libraries are fun to work with, but also very confusing
@darthmaim how are you approaching yours?
Archomeda
@Archomeda
Oct 31 2016 18:57
oh @queicherius, i see you renamed gw2e-gw2api-client to gw2api-client on npm :/
David Reeß
@queicherius
Oct 31 2016 19:20
Yep, since that's a general purpose package and not really limited to gw2efficiency anymore. It also supports caching now (and doesn't require the babel-polyfill anymore). The only incompatibility between the two versions (aka the major version bump) is one changed method signature for guilds.
Archomeda
@Archomeda
Oct 31 2016 19:20
i noticed, amazing job :)
a sidenote, i officially hate the css clip-path property now
David Reeß
@queicherius
Oct 31 2016 19:22
Are you using redux-thunk @Archomeda ?
Archomeda
@Archomeda
Oct 31 2016 19:22
well, i do not specifically hate that, it's more that i hate that IE/Edge don't support it properly
yeah
David Reeß
@queicherius
Oct 31 2016 19:22
That one is pretty good for async actions, imo
Archomeda
@Archomeda
Oct 31 2016 19:23
i also use redux-actions
and those two were very confusing to get them working together
David Reeß
@queicherius
Oct 31 2016 19:26
I usually either use redux-thunk or redux-saga, but the latter has a lot of concepts to learn before it is useful
Archomeda
@Archomeda
Oct 31 2016 19:27
haven't looked at that yet
there are already a lot of concepts that i'm using now that i've never seen before
David Reeß
@queicherius
Oct 31 2016 19:28
I just used that for something that was super dependent on same-tick-based updating (was a mobile pokemon map, before they nuked all the scanners). I think the thunks are easier to handle
That's what makes programming fun! :D
Archomeda
@Archomeda
Oct 31 2016 19:29
but hey, i figured that redux was a good way to attach a global storage in react
and reselect helps with it too
i hope it works the way i'm expecting it to work, because then it should make updating various things in the build editor way easier
but yeah it's fun, when you finally have it working that is ;)
David Reeß
@queicherius
Oct 31 2016 19:31
What I love about the JS environment is that you can choose the exact toolset you need for getting the job done (and that is heavily encouraged).
reselect is quite cool, yeah
If you ever want to localize the app in the end, take a look at https://github.com/queicherius/react-globe (shameless plug)
Archomeda
@Archomeda
Oct 31 2016 19:33
oh, i was looking for one and ended up with react-intl
i still have no clue how to actually localize it in other languages though
the documentation is not very clear
David Reeß
@queicherius
Oct 31 2016 19:34
Yeah it bascially wraps that and gives you a little better interface / more features. My main issue with react-intl was how verbose you had to write it and no native support for gettext-files (which I use for efficiency)
Archomeda
@Archomeda
Oct 31 2016 19:36
hmm, i'll keep it in mind thanks!
David Reeß
@queicherius
Oct 31 2016 19:38
And it also allows you to rip out all the messages directly out of the code so you have them ready for translation, with the other libraries you usually have to maintain them yourself with some translation keys like HOME_PAGE_TEXT or something
And I just wanted super simple translation like in angular.js.
Archomeda
@Archomeda
Oct 31 2016 19:39
yeah, seems easier to work with
one thing i still don't like with react, is that it promotes using css inside your .jsx files
so i'm still using sass
Nabrok
@Nabrok
Oct 31 2016 19:43
I dpnm
I don't think it does more than anything else
David Reeß
@queicherius
Oct 31 2016 19:43
I dont like having the CSS in the js files, but I do like bundling CSS with scope on a component basis. It makes it super easy to think about. -> css-modules
Archomeda
@Archomeda
Oct 31 2016 19:44
ah, i suppose that's making it better yeah
David Reeß
@queicherius
Oct 31 2016 19:45
(Disclaimer: I am a big fanboy of css-modules, because finally my css is as clean as my js instead of being giant sass files per page)
Archomeda
@Archomeda
Oct 31 2016 19:45
it's funny how i'm practically namespacing my css classes manually
David Reeß
@queicherius
Oct 31 2016 19:45
And the super cool bonus is that you can share your component between projects, including their styles, since that stuff is scoped
Archomeda
@Archomeda
Oct 31 2016 19:46
oh, you can even include them on per page basis, that's neat
or component rather
how does minify and autoprefixer work then?
David Reeß
@queicherius
Oct 31 2016 19:48
In my setup webpack emits a single css file in the end and runs the minifier / prefixer on that
Archomeda
@Archomeda
Oct 31 2016 19:49
hmm alright
Pat Cavit
@tivac
Oct 31 2016 20:39
we like css modules so much we re-implemented it w/o all the bugs and bullshit
darthmaim
@darthmaim
Oct 31 2016 20:49
css modules are great
its really the only sane way to write reusable css code
also, @Archomeda, currently its a simple react page just loading all professions, showing their weapons and the weapon skills
Archomeda
@Archomeda
Oct 31 2016 20:52
oh cool, also react :D
darthmaim
@darthmaim
Oct 31 2016 20:53
yep
although the most time I spent on the service worker so far
Archomeda
@Archomeda
Oct 31 2016 20:53
might be worth it to join forces and work together
darthmaim
@darthmaim
Oct 31 2016 20:53
loading/caching all the api results and clearing the cache when the api build changes
Archomeda
@Archomeda
Oct 31 2016 20:55
i've been focusing on various other stuff too much really :P
i just love css3 transitions
darthmaim
@darthmaim
Oct 31 2016 20:55
^^
Archomeda
@Archomeda
Oct 31 2016 20:56
plus that screenshot i linked earlier with the traits? yeah... that costed me some time too
especially because of that annoying clip-path support
so i ended up with using svg instead
darthmaim
@darthmaim
Oct 31 2016 20:57
haha, yeah
Archomeda
@Archomeda
Oct 31 2016 20:57
it's amazing that you can even animate inner components of svg elements
darthmaim
@darthmaim
Oct 31 2016 20:57
In the end I just said screw IE
Archomeda
@Archomeda
Oct 31 2016 20:58
haha
darthmaim
@darthmaim
Oct 31 2016 20:58
I have a local version of my gw2 asset service that adds the clipping serverside to the trait icons
Archomeda
@Archomeda
Oct 31 2016 20:59
i mean, i also created this in the past (horribly outdated now)
to which i also said, screw IE
darthmaim
@darthmaim
Oct 31 2016 20:59
^^
Archomeda
@Archomeda
Oct 31 2016 21:00
but i've found a solution with svg now, which is also supported by IE and Edge
darthmaim
@darthmaim
Oct 31 2016 21:00
My server side solution is probably the best, because its adds the alpha mask from the gw2dat to all trait icons
Archomeda
@Archomeda
Oct 31 2016 21:00
i do love the effect i created with the big trait icon
just like ingame, sort of
darthmaim
@darthmaim
Oct 31 2016 21:00
yeah, looks cool
Archomeda
@Archomeda
Oct 31 2016 21:02
oh right, yeah the minor trait icons have a black background
although the one i'm using right now for testing does have an transparent background
this vs this
just how in the hell...
(chronomancer trait line vs dueling trait line)
darthmaim
@darthmaim
Oct 31 2016 21:04
minorTraitAlphaMask.png
majorTraitAlphaMask.png
those are the alpha masks
Archomeda
@Archomeda
Oct 31 2016 21:05
oh, you can also do that with svg
darthmaim
@darthmaim
Oct 31 2016 21:05
you could, yes
I'm also cropping trait background and skill icons serverside
Archomeda
@Archomeda
Oct 31 2016 21:05
(i'm cheap i don't have a vps myself :P)
darthmaim
@darthmaim
Oct 31 2016 21:05
:P
Archomeda
@Archomeda
Oct 31 2016 21:05
meh, cropping trait line background :P
i'm actually not sure about the exact width and height, so i just did something by measuring the ingame ui, and did that stuff inside the svg :P
darthmaim
@darthmaim
Oct 31 2016 21:06
haha
Archomeda
@Archomeda
Oct 31 2016 21:07
let me see
<svg className="specialization-background">
    <defs>
        <polygon id="icon" points="161,165 119,141 77,165 77,213 119,237 161,213"/>
        <clipPath id="clip">
            <use xlinkHref="#icon"/>
        </clipPath>
        <image id="image" xlinkHref="https://render.guildwars2.com/file/9D9F0DA395FDB21423981FAC2CABC850CF7E0A62/1012053.png" width="1024" height="256"/>
    </defs>
    <rect width="645" height="134" fill="black"/>
    <use id="background" xlinkHref="#image" opacity="0.5" transform="translate(0,-120)"/>
    <use xlinkHref="#icon" stroke="black" strokeWidth="4" transform="translate(0,-120)"/>
    <use xlinkHref="#icon" stroke="white" strokeWidth="2" transform="translate(0,-120)"/>
    <use xlinkHref="#image" clipPath="url(#clip)" transform="translate(0,-120)"/>
</svg>
this is how the svg looks like
ehm, well in combination with react
because xlinkHref instead of xlink:href
darthmaim
@darthmaim
Oct 31 2016 21:08
I am using 647x136
but no idea where I got those values from
Archomeda
@Archomeda
Oct 31 2016 21:09
i used 647x136 on that page i linked earlier
i think i removed 2 pixels because of a black border i have now
darthmaim
@darthmaim
Oct 31 2016 21:10
thats the size the game uses according to @lye: https://github.com/arenanet/api-cdi/issues/76#issuecomment-128130775
Archomeda
@Archomeda
Oct 31 2016 21:11
ah right
maybe i got those values from there as well then
anyway, as i mentioned earlier, feel like collaborating on this? i think with us working separately does us no good
darthmaim
@darthmaim
Oct 31 2016 21:13
sure :)
Archomeda
@Archomeda
Oct 31 2016 21:13
i don't have a repo for this yet though (i'm terrible)
darthmaim
@darthmaim
Oct 31 2016 21:13
me neither :(
I can make one if you want
so we can atleast stop spamming this chat and collect our ideas in the issues
Archomeda
@Archomeda
Oct 31 2016 21:14
sounds good to me
i hope you have way less dependencies than i do
my package.json consists of 36 dev dependencies
which is all used to compile one big javascript file that is saved as a static resource
(plus css too)
darthmaim
@darthmaim
Oct 31 2016 21:16
I created the repo and invited you and @queicherius for now
Archomeda
@Archomeda
Oct 31 2016 21:17
oh cool, you have a private repo
darthmaim
@darthmaim
Oct 31 2016 21:17
Im just used to create private ones
can make it public if you want
since they removed the private repo limit I make way too many repos...
Archomeda
@Archomeda
Oct 31 2016 21:18
oh nah, i'm fine with it
maybe later once it's in a working state
darthmaim
@darthmaim
Oct 31 2016 21:19
:+1:
David Reeß
@queicherius
Oct 31 2016 21:19
I am currently in the process of organizing all my projects... I'm at 265 and rising. What is the backup strategy you guys use for code? ATM i am thinking of just making tarballs, but that seems so... meh. :(
And neat, will take a look
Archomeda
@Archomeda
Oct 31 2016 21:19
backup?
ehm... i think i still have a lot of folders in my git folder
yup, 66
and some of them are not even on github xD
darthmaim
@darthmaim
Oct 31 2016 21:21
I'm just hoping that my dev laptop and github will never crash at the same time
I used to mirror all my repos to my server
but I stopped doing that for some reason
David Reeß
@queicherius
Oct 31 2016 21:21
I bascially want my current projects synced between 2 computers and my past projects somewhere save (but not neccessarly on my computer). And putting it all on github seems excessive (there is also some data that I really dont want on public servers)
Yeah I was thinking about that too
Archomeda
@Archomeda
Oct 31 2016 21:22
hmm
host your own gitlab server?
maybe a bit excessive though
darthmaim
@darthmaim
Oct 31 2016 21:23
I just had a git server without any web interface
David Reeß
@queicherius
Oct 31 2016 21:23
But I don't really trust myself with something like rsync. I can already see me nukeing the git history by accident. :<
darthmaim
@darthmaim
Oct 31 2016 21:25
^^
Archomeda
@Archomeda
Oct 31 2016 22:38
lol
smiley
@codemasher
Oct 31 2016 22:42
it me
ohai @Eearslya long time no see :D
Eearslya Sleiarion
@Eearslya
Oct 31 2016 22:43
ack wait wrong chat
smiley
@codemasher
Oct 31 2016 22:44
!seen Earslya
heh