Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
egonw opened this issue Feb 1, 2023 · 11 comments
Open

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

egonw opened this issue Feb 1, 2023 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@egonw
Copy link
Member

egonw commented Feb 1, 2023

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
Copy link
Member

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 AlexanderPico added the question Further information is requested label Feb 2, 2023
@AlexanderPico AlexanderPico assigned hasanbalci and unassigned mkutmon May 5, 2023
@AlexanderPico AlexanderPico added enhancement New feature or request and removed question Further information is requested labels May 5, 2023
@AlexanderPico
Copy link
Member

AlexanderPico commented May 5, 2023

@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
Copy link
Contributor

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
Copy link
Member

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
Copy link
Member

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
Copy link
Contributor

hasanbalci commented May 12, 2023

@AlexanderPico This commit wikipathways/gpml2pvjson-js@48ffe9c 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
Copy link
Member

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.

@khanspers
Copy link
Member

Reopening this since the pathway information still appears in the same (old) format on the site (https://www.wikipathways.org/pathways/WP5497.html). Based on this issue, it seems gpml2pvjson was updated, but maybe not the svg/png generation?

@khanspers khanspers reopened this Jan 15, 2025
@AlexanderPico
Copy link
Member

@hasanbalci Any ideas?

@hasanbalci
Copy link
Contributor

I think Github actions uses the gpml2pvjson package from npm. So for this solution to be active, the latest version of the gpml2pvjson package needs to be published to npm.

@AlexanderPico
Copy link
Member

@hasanbalci Is it easy for you to publish to npm, when you have a chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants