-
Notifications
You must be signed in to change notification settings - Fork 50
Launcher tool: Use webactions #1226
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
Open
iLLiCiTiT
wants to merge
99
commits into
develop
Choose a base branch
from
feature/107-webactions-in-launcher-tool
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,648
−586
Open
Changes from 55 commits
Commits
Show all changes
99 commits
Select commit
Hold shift + click to select a range
172fc27
remove applications action logic
iLLiCiTiT 05ba75c
added more options how to icon can be defined
iLLiCiTiT 9123994
added baseic way to show webactions
iLLiCiTiT 698fef2
added helper function to get settings variant
iLLiCiTiT 9a81643
added addon name and version to action data
iLLiCiTiT d07e3b9
implemented webaction trigger
iLLiCiTiT 777b835
added 'transparent' icon type
iLLiCiTiT 3917038
handle empty icon in actions widget
iLLiCiTiT 4d1ad75
handle missing icon in action manifest
iLLiCiTiT 4cf0c9b
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT c97b58f
fix boolean comparison
iLLiCiTiT c214aa5
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT 1a0e099
added config fields into actions model
iLLiCiTiT 4d69784
added new methods to controller
iLLiCiTiT 99a7d2f
implemented base of action config UI
iLLiCiTiT 6dcd8f2
implemented helper method to set values of dialog
iLLiCiTiT 63408d7
use current values for UI
iLLiCiTiT 79b09e6
move types to docstring
iLLiCiTiT 95bf292
fix spacing
iLLiCiTiT 4e9a2a5
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT ce13754
set 'referer' header
iLLiCiTiT 867dae4
pass action label to trigger action
iLLiCiTiT f670029
added option to run detached process
iLLiCiTiT d84f33b
use run detached ayon launcher process to run webactions
iLLiCiTiT 5e84153
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT 9e21c4d
handle missing 'color'
iLLiCiTiT 31803b0
don't fail whole UI if icon cannot be parsed
iLLiCiTiT f2390a7
use correct color value
iLLiCiTiT 6440974
raise error when running server action
iLLiCiTiT 4b385c1
change place where missing key is handled
iLLiCiTiT 33df9ec
fox example
iLLiCiTiT 2513741
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT a93c877
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT 34d66c6
split trigger or action and webaction
iLLiCiTiT 8338680
basic implementation of webactions handling
iLLiCiTiT c7526b5
revert dialog conditions
iLLiCiTiT acd5916
better download uri handling
iLLiCiTiT 4728258
download image from url
iLLiCiTiT 34dcc78
added more options to attribute definitions dialog
iLLiCiTiT 149c904
added markdown label
iLLiCiTiT c29d14d
use markdown label for attribute definitions label
iLLiCiTiT 27dc51a
enhance actions utils in loader
iLLiCiTiT 1a7b137
better detection of ayon url
iLLiCiTiT bb168a1
actually fill form correctly
iLLiCiTiT 0fc29ae
show form correctly
iLLiCiTiT cd63538
fix variable name
iLLiCiTiT d7d3d1b
log traceback
iLLiCiTiT 6bcf514
add TypeError to avoid typehint issues
iLLiCiTiT 839eecc
remove unused variable
iLLiCiTiT 0cbdda1
store the values into variables
iLLiCiTiT d5063e0
convert default values to correct type
iLLiCiTiT 131b4fb
safe key access
iLLiCiTiT 5f18f63
formatting fix
iLLiCiTiT 73a45f5
more config fields conversion fixes
iLLiCiTiT c88fc65
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT f036a1f
add soft dependency for applications addon
iLLiCiTiT f35afa3
bump required server version
iLLiCiTiT 3e4a1d7
use toast messages
iLLiCiTiT 1de2ecc
Unified messages a little
iLLiCiTiT e971ffd
use success from response
iLLiCiTiT b1e4598
remove duplicated animation start
iLLiCiTiT ecec0aa
use logger formatting
iLLiCiTiT 44da9f5
add type-hints to '_prepare_ayon_launcher_env'
iLLiCiTiT 80d3255
fix return type
iLLiCiTiT 4b1f1a9
add typehints
iLLiCiTiT 316c7e7
remove unnecessary f string
iLLiCiTiT e9d70fa
keep webactions cached for 20 seconds
iLLiCiTiT 0368e5e
hard reset webactions on refresh
iLLiCiTiT f22206e
use 'MarkdownText' format if is available
iLLiCiTiT d02eeac
move ActionItem to abstract.py
iLLiCiTiT 4954992
added some typehints
iLLiCiTiT ea5d5cf
added missing imports
iLLiCiTiT 1f716ce
added helper class 'WebactionContext' to pass webaction info
iLLiCiTiT 2cf4b0d
Use more generic except
iLLiCiTiT 9bd36c2
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT cc7668d
Set config values on all items in group
iLLiCiTiT a4fd1e1
add settings icon to each action
iLLiCiTiT 6f40c92
fix style issues
iLLiCiTiT 60f6e0c
simplified config dialog method
iLLiCiTiT 2fd95e3
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT 9787f4a
fix number def creation
iLLiCiTiT 5baf624
remove mouse tracking
iLLiCiTiT 0be94fc
remove unnecessary line
iLLiCiTiT d312101
use tooltip widget to show subactions
iLLiCiTiT 9416d8b
fix typo
iLLiCiTiT 720e161
add clickable label to the shown menu
iLLiCiTiT f7c072c
show action icon in menu
iLLiCiTiT 74bdd09
fix ruff issue
iLLiCiTiT 5cf146e
show the popup at the moment of hover
iLLiCiTiT 6b7322a
change overlay expanding group
iLLiCiTiT e2bc547
better looks
iLLiCiTiT 9327cf5
change icons and scale view on hover
iLLiCiTiT ac04845
use lighter colors
iLLiCiTiT 72990d3
added animation
iLLiCiTiT d57f4a0
formatting fix
iLLiCiTiT 365b4d8
fix variable name
iLLiCiTiT a099b0b
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT 0e33ec9
change scrolling
iLLiCiTiT 52687f2
Merge branch 'develop' into feature/107-webactions-in-launcher-tool
iLLiCiTiT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,92 @@ | ||
from qtpy import QtWidgets | ||
from __future__ import annotations | ||
|
||
from typing import Optional | ||
|
||
from qtpy import QtWidgets, QtGui | ||
|
||
from ayon_core.style import load_stylesheet | ||
from ayon_core.resources import get_ayon_icon_filepath | ||
from ayon_core.lib import AbstractAttrDef | ||
|
||
from .widgets import AttributeDefinitionsWidget | ||
|
||
|
||
class AttributeDefinitionsDialog(QtWidgets.QDialog): | ||
def __init__(self, attr_defs, parent=None): | ||
super(AttributeDefinitionsDialog, self).__init__(parent) | ||
def __init__( | ||
self, | ||
attr_defs: list[AbstractAttrDef], | ||
title: Optional[str] = None, | ||
submit_label: Optional[str] = None, | ||
cancel_label: Optional[str] = None, | ||
submit_icon: Optional[QtGui.QIcon] = None, | ||
cancel_icon: Optional[QtGui.QIcon] = None, | ||
parent: Optional[QtWidgets.QWidget] = None, | ||
): | ||
super().__init__(parent) | ||
|
||
if title: | ||
self.setWindowTitle(title) | ||
|
||
icon = QtGui.QIcon(get_ayon_icon_filepath()) | ||
self.setWindowIcon(icon) | ||
self.setStyleSheet(load_stylesheet()) | ||
|
||
attrs_widget = AttributeDefinitionsWidget(attr_defs, self) | ||
|
||
if submit_label is None: | ||
submit_label = "OK" | ||
|
||
if cancel_label is None: | ||
cancel_label = "Cancel" | ||
|
||
btns_widget = QtWidgets.QWidget(self) | ||
ok_btn = QtWidgets.QPushButton("OK", btns_widget) | ||
cancel_btn = QtWidgets.QPushButton("Cancel", btns_widget) | ||
cancel_btn = QtWidgets.QPushButton(cancel_label, btns_widget) | ||
submit_btn = QtWidgets.QPushButton(submit_label, btns_widget) | ||
|
||
if submit_icon is not None: | ||
submit_btn.setIcon(submit_icon) | ||
|
||
if cancel_icon is not None: | ||
cancel_btn.setIcon(cancel_icon) | ||
|
||
btns_layout = QtWidgets.QHBoxLayout(btns_widget) | ||
btns_layout.setContentsMargins(0, 0, 0, 0) | ||
btns_layout.addStretch(1) | ||
btns_layout.addWidget(ok_btn, 0) | ||
btns_layout.addWidget(submit_btn, 0) | ||
btns_layout.addWidget(cancel_btn, 0) | ||
|
||
main_layout = QtWidgets.QVBoxLayout(self) | ||
main_layout.addWidget(attrs_widget, 0) | ||
main_layout.addStretch(1) | ||
main_layout.addWidget(btns_widget, 0) | ||
|
||
ok_btn.clicked.connect(self.accept) | ||
submit_btn.clicked.connect(self.accept) | ||
cancel_btn.clicked.connect(self.reject) | ||
|
||
self._attrs_widget = attrs_widget | ||
self._submit_btn = submit_btn | ||
self._cancel_btn = cancel_btn | ||
|
||
def get_values(self): | ||
return self._attrs_widget.current_value() | ||
|
||
def set_values(self, values): | ||
self._attrs_widget.set_value(values) | ||
|
||
def set_submit_label(self, text: str): | ||
self._submit_btn.setText(text) | ||
|
||
def set_submit_icon(self, icon: QtGui.QIcon): | ||
self._submit_btn.setIcon(icon) | ||
|
||
def set_submit_visible(self, visible: bool): | ||
self._submit_btn.setVisible(visible) | ||
|
||
def set_cancel_label(self, text: str): | ||
self._cancel_btn.setText(text) | ||
|
||
def set_cancel_icon(self, icon: QtGui.QIcon): | ||
self._cancel_btn.setIcon(icon) | ||
|
||
def set_cancel_visible(self, visible: bool): | ||
self._cancel_btn.setVisible(visible) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.