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

ENH: add web-based metadata entry with HTML/JS and QWebEngineView #319

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jsheunis
Copy link
Member

@jsheunis jsheunis commented Oct 11, 2022

This PR aims to add web-based metadata entry with HTML/JS and QWebEngineView.

@jsheunis jsheunis marked this pull request as draft October 11, 2022 14:49
@jsheunis
Copy link
Member Author

I upgraded Pyside6 from 6.3.1 to 6.3.2, but this had no effect.

@jsheunis
Copy link
Member Author

sorry @mslw that was an accidental request

@jsheunis jsheunis marked this pull request as ready for review October 14, 2022 13:06
@mih
Copy link
Member

mih commented Oct 17, 2022

I would want to avoid importing JS assets into the repo. They are more or less just "binary" blobs that we do not intent to maintain. I see two ways:

  1. provide an initialization routine that downloads those blobs into a local cache dir once needed
  2. we turn the repo into an annex dataset and annex addurl these files

I'd prefer the latter ATM, but I did not think much about it.

@jsheunis
Copy link
Member Author

  1. provide an initialization routine that downloads those blobs into a local cache dir once needed
  2. we turn the repo into an annex dataset and annex addurl these files

Although, that would always require internet connectivity when the metadata functionality is used, right? And we specifically want this to be functional while users are not connected?

@mih
Copy link
Member

mih commented Oct 17, 2022

(1) Would need it once, yes. (2) would not. The assets are baked into a release as usual. They merely not pollute the repo (just their checksums).

@adswa
Copy link
Member

adswa commented Oct 26, 2022

EDIT: Updating to Pyside 6.4 solved this.

Maybe its something on my system, but I can see a metadata browser. Instead, I see two different errors.

The first is an uncaught attribute error thrown on the first invocation of self._add_list_item(form):

> /home/adina/repos/datalad-gooey/datalad_gooey/custom_metadata.py(60)__init__()
-> for form in form_data:
(Pdb) n
> /home/adina/repos/datalad-gooey/datalad_gooey/custom_metadata.py(61)__init__()
-> self._add_list_item(form)
(Pdb) 
Traceback (most recent call last):
  File "/home/adina/repos/datalad-gooey/datalad_gooey/custom_metadata.py", line 94, in _load_form
    self._browser.setUrl(qurl)
AttributeError: 'CustomMetadataWebEditor' object has no attribute '_browser'
> /home/adina/repos/datalad-gooey/datalad_gooey/custom_metadata.py(60)__init__()

The second seems to be a problem opening the browser, but I suspect its something on my system that might be the problem:

qt.webenginecontext: 

GLImplementation: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.6
Using Default SG Backend: yes
Using Software Dynamic GL: no
Using Angle: no

Init Parameters:
  *  application-name datalad 
  *  browser-subprocess-path /home/adina/env/gooey/lib/python3.10/site-packages/PySide6/Qt/libexec/QtWebEngineProcess 
  *  create-default-gl-context  
  *  disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  enable-features TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  gpu-preferences UAAAAAAAAAAoAAAQAAAAAAAAAAAAAAAAAABgAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAA= 
  *  in-process-gpu  
  *  use-gl desktop 

[1098597:1098718:1026/090720.746685:ERROR:nss_util.cc(286)] After loading Root Certs, loaded==false: NSS error code: -8018

In case someone else has seen this, I'd be curious to get some more insights on how I could make it work.

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

Successfully merging this pull request may close these issues.

3 participants