wikipathways / wikipathways-database

WikiPathways Database
https://www.wikipathways.org
3 stars 12 forks source link

more user-friendly formatting of "Last modified"? #21

Closed egonw closed 1 year ago

egonw commented 1 year ago

I just noted that the GPML here has injected "Last modified" , which actually is nice:

image

But maybe if can be formatted as 2022-03-09 15:08:42 ?

AlexanderPico commented 1 year ago

Personally, I think it's ugly to include any of this. It's in the SVG and PNG images. And when it overlaps the cell border and other objects (like the case above) it's not easy to remove when making a figure.

I'd vote for removing this info section completely. Or just having the Name maybe.

AlexanderPico commented 1 year ago

@hasanbalci Here's another pvjs issue (I think) that should be relatively easy. Can we try a version that just lists the pathway title and WPID in parentheses, like on our website?

So instead of:

Name: ACE inhibitor pathway
Last-edited: 20230401
Organism: Homo sapiens

We could just have:

ACE inhibitor pathway (WP554)

No need for the Name: preface since it's obviously a title.

hasanbalci commented 1 year ago

Apparently, these titles are generated in gpml2pvjson repository. I made the suggested change and tried it locally. Here are some sample results:

WP554

WP5358

In some rare cases, we can still have an overlap: WP3

If you're ok with this, I can push the change.

AlexanderPico commented 1 year ago

Love it! This is going to be so much better. Will still overlap in some cases, but clearly a huge improvement.

I presume it's not trivial to insert vertical space between the title and the rest of the model?

AlexanderPico commented 1 year ago

I'll wait to regenerate SVGs for all GPML in our database until after this fix and the ilnkout fix are in place. Ping me when you think the code is ready for a huge batch run. @hasanbalci

hasanbalci commented 1 year ago

@AlexanderPico This commit https://github.com/wikipathways/gpml2pvjson-js/commit/48ffe9c1870914d2eb52a93f9bc47d5dfdfbf222 now creates the title as suggested.

I think it's not straightforward to insert vertical space between the title and the rest of the model as positions of the graph elements are translated from gpml. Maybe it would be good if PathVisio had something like a fit button which fits the pathway towards top-left corner with a default padding from both top and left or an automatic fit during export. Otherwise, currently pathways have different amount of padding from sides as seen in the images I added in my previous comment depending on how the curators exported it.

For this change and the other fixes in pvjs repository to be active, both repositories should be built and published in npm. If there are other urgent issues in these repos, maybe we can fix them as well before a new version release in npm.

AlexanderPico commented 1 year ago

Excellent work. Can you open an issue in PathVisio repo with your ideas? I agree that that's the right place to address the positioning of pathway infobox and other elements.