mirror of
https://ghproxy.net/https://github.com/elementor/one-click-accessibility.git
synced 2025-08-17 19:51:19 +08:00
Release/v3.6.0 (#376)
* Bump WP version * ♻️ Initial Refactor commit [APP-687] (#109) * Initial refactor commit * ✅ Added build and tests CI/CD * PR Rejects * Rejects leftover * Setup base (#110) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: settings variable * update: removed duplicate css import * Update modules/settings/assets/js/api/index.js Co-authored-by: VasylD <vasyld@elementor.red> --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: VasylD <vasyld@elementor.red> * [Infra] ✅ updated Github actions (#114) * updated github actions * removed composer github auth * PHPCS * removed package-lock.json from ignore to allow `npm ci` * added missing husky * ignore legacy * removed unused non existing import * Add connect modal (#111) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * fix: alignment and style * update: imports * update: removed conflicting imports * fix: add compatibility for mobile devices --------- Co-authored-by: Ohad <ohad@elementor.com> * [APP 705] add connect module, settings and notification component (#112) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports --------- Co-authored-by: Ohad <ohad@elementor.com> * [APP 707] general setting components (#113) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * Update modules/settings/assets/js/components/color-picker/style.css Co-authored-by: Raz Ohad <admin@bainternet.info> * update: color picker class name --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> * [App 780] Navigation Sidebar (#115) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * update: added translations * fix: admin top bar layout * update: exports of icons * update: exports of components * add: aliases for imports and fix exports * fix: height and styling of the layout * fix: unhide wp footer * update: keep widget menu open on page load (default) * update: linter rules to move first prop to new line * update: linter rules to move first prop to new line --------- Co-authored-by: Ohad <ohad@elementor.com> * Fix error on install plugin, add prettier (#116) * Feature/app 810 assemble icon settings page (#117) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * Update modules/settings/assets/js/components/color-picker/style.css Co-authored-by: Raz Ohad <admin@bainternet.info> * update: color picker class name * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * add: props to wrapper * add: icon design and position setting layouts * add: in page scroll behaviour to the settings * add: widget icons and getter function * update: icon design settings getter and setter functions * update: imports * add: mobile layout for position settings * add: icon position settings * add: icon position settings hooks and handlers * fix: alignment of controls in AlignmentMatrixControl * update: useSettings and usePositionSetting hooks and relevant functions * fix: colors of AlignmentMatrixControl * fix: styling of components and layouts * add: aliases * add: container wrapper to page * update: accessibility options rendering logic * fix: order of the icons * add: aliases for components and hooks imports * fix: styling of settings panel * fix: container height for settings page * update: toggle control states * add: widget icon settings * add: load saved widget icon settings * update: move layout to page for different designs per page * update: add changes tracking and disable button logic * add: async/await to save settings * update: convert options to array of objects * Update modules/settings/assets/js/components/bottom-bar/index.js Co-authored-by: VasylD <vasyld@elementor.red> * Update modules/settings/assets/js/app.js Co-authored-by: VasylD <vasyld@elementor.red> * fix: remove duplicate entries --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: VasylD <vasyld@elementor.red> * Feature/app 708 widget menu settings (#118) * add: icons for menu settings * add: placeholder layout for widget preview in menu settings * update: load saved settings and updated imports * add: logics for handling and saving menu settings * add: useSavedSettings hook * update: set export as default for Sidebar layout * add: widget menu settings layout and settings * update: add widget menu settings and widget preview layouts * add: hide/show minimum option alert notification * update: styling of the save button * update: save settings logic to use async/await * fix: accessibility text icon * update: app type (#119) * [APP-834] Update account menu buttons (#121) * update: account menu buttons * update: billing link * add: error handling for switch account * [APP-835] add service data (#122) * add: client functions * add: site register and site info endpoints * update: add plan data settings * update: add support for 201 response code * update: add plan data key * update: store the plan data on the once the site is registered * update: add filter for client url * add: retry registering in there is any error after connect * update: setting prefix * add: plan data * update: add account details to menu * fix: lint issues * update: add data checkbox support (#123) * [APP-928] Settings pointer (#125) * add: settings pointer * update: add alias for the settings * [APP-837] Add post connect modal (#120) * add: post connect modal * update: settings prefix * fix: connect modal design * update: connect modal text * add: connect modal graphics * update: connect modal icon * update: post connect modal * update: sidebar menu text * update: text of icon settings * update: text * update: php compatibility with return types * add: accessibility statement page structure (#126) * [APP-721] Render widget and global settings (#124) * add: webhook endpoint * add: widget module * add: default widget settings on successful registration * update: name of global object to ea11yWidget * update: remove json encoding to make objects available on the frontend * update: widget url, filter and enqueuing method * update: removed obsolete code * update: enqueue script only when connected * update: add check for valid plan data and key * update: conditional check * update: conditional check * fix: widget loading error (#128) * [Legacy] Upgrade To New [APP-949] (#127) * Added `Notice_Base` and `Notices` component to core module * Always load core module and load all other modules based on legacy status * added filter in customizer settings * added bubble / pimple in admin menu to indicate upgrade * added `Dismissible_Deprecated_Nag` notice to none legacy pages * added `Dismissible_Deprecated_Nag` notice to legacy pages * Added `Upgrade` component to legacy module includes: * loading of notices * introduction modal * admin menu pimple * customizer notice * pointer * confirmation modal * upgrade logic and handler * ✅ Fixed legacy module test * added `local:quick-run` command to run in browser mode * update phpunit workflow * ensure wp.ajax is loaded * wrong translations * Updated strings * added "Equally" * remove unused test * ✅ use custom version of wp test library (#129) * ✅ use custom version of wp test library * cleanup * update WP versions for testing * [APP-711] Widget preview (#130) * add: dynamic script loader for widget * update: settings name * update: settings save function and comments * update: tools settings object structure * add: widget preview section * update: added setting page slug as a constant * update: enqueue widget for preview in the settings * add: widget icon assets link * add: widget icon svgs * update: store widget url in a constant * update: store widget url in a constant * update: trigger widget preview update on menu item changes * update: remove the icon option from the frontend. * update: add widget URL * update: plan data setting type * update: widget plan url * update: widget plan url and parse plan data * fix: phpcs error ext-json missing * fix: widget url * fix: save and use plan data as a serialized option * fix: use template string for widget url * [APP-908] Accessibility generator (#131) * add: accessibility statement radio icons * update: add form group on radio buttons * add: statement generator * add: statement generator * add: accessibility statement data option * update: create page in WordPress and save it to the option * update: exclude zip file from the git * update: render statement page conditionally * add: statement link layout and settings * add: preload statement data * update: publish the created page and add link for it * update: changed Dynamic Script Loader to WidgetLoader * add: accessibility statement url * update: text and styling * update: styling of the preview text * update: restructure statement generator * add: support for dynamic update in statement links * update: remove index.css file for widget loader * add: widget styling for settings page * add: empty link when hide link is enabled * update: statement page structure and logic * fix: typo * update: convert component into a styled component * fix: styling and layout * update: icons * update: convert radio buttons to styled component * fix: typo and style * add: fading for the link preview * update: import * update: styling and spacing * fix: sidebar layout * update: wpcs to latest version * fix: spacing * fix: wpcs version * add: check for valid statement page * fix: jitters on rendering * fix: use escape attribute * update: settings menu slug and plugin name * fix: menu item rendering * update: definition of the styled text field * add: addPage function to the API * fix: add notification on page creation * add: copy link icon * update: optimize SVGs * [APP-908] Additional fixes (#133) * fix: text domains * updated: styled component syntax * update: use await instead of then * fix: prevent application crash in case widget fails to load * add: generated info tip card * update: refactor function * Fix: Fix the QA bugs [n/a] (#135) * [APP-830] Add mixpanel events (#134) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel (#136) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] rename events (#137) * Connect and Preview Fixes (#139) * updated connect admin page * Use unified widget URL instead of hardcoded Js to support envs * Removed enqueue of fictional widget.js and reuse settings `admin` handle * Fix: Fix the QA bugs [n/a] (#138) * New: Finish the BE integration [n/a] * Fix: Fix some bugs [n/a] * upgrade flow UI and design tweaks [app-949] (#141) * Updated Learn More links with UTM's * Tweaked Pointer strings Icon and CTA * dismissible notice strings * sticky notice strings * updated upgrade flow design for pointer, notices, introduction modal, and confirmation modal * added build script * [APP-979] Update links and plugin name (#140) * Ensure loading of legacy widget based on any saved data and fixed legacy JS * Bug/app 1002 (#143) * Bug: Update the logo in the "Hide Widget" modal [APP-1001] * Fix: Update the side menu spaces [APP-1002] * [APP-991] Add translation for statement (#142) * [APP-979] Update links and plugin name * [APP-991] Add translation for statement * Set Prod Widget URL * [APP-1004][APP-1005][APP-1006] Fix generator UI and logic, fix statement UI, fix copy link (#144) * [APP-1004] Fix generator UI and logic * [APP-1005] Fix statement UI * [APP-1005] Fix statement UI * Mixpanel record session * Fix: Enhance position values validation [APP-1009] (#146) * Bug/app 1003 (#147) * Fix: Add a border to the preview [n/a] * Fix: Fix Capabilities screen UI [APP-1003] * [APP-1020] add missed events (#148) * [APP-1015] fix switch account (#149) * [APP-1015] fix switch account (#150) * [APP-1021] Fix switch modal ui (#151) * fix: ui issues * fix: translation strings * [APP-912] add default settings for RTL (#152) * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-1026] Remove HTML breaking <style> tag & update pointer logic (#153) * fix: remove extra closing tag * update: hide settings pointer when plugin settings is opened * update: remove unused functions * update: add help text to mobile position settings * Bug/app 1003 (#157) * Fix: Add missed translations [n/a] * Fix: Refresh the plan data on page load [n/a] * New: Add loader to the settings [n/a] * update: delete lock key after each check (#160) * New: Update dashboard icon size [n/a] (#158) * New: Update dashboard icon size [n/a] * Fix: Fix widget previews [n/a] * [APP-1018] Help menu change (#155) * update: remove accessibility word from menu items * update: remove top bar * update: add help button to the sidebar * update: re-add spacing in styled css code * update: create styled components * [APP-973] Add an UTM for users upgrading from one click to the new widget (#165) * update: ui of the statement preview (#166) * [APP-1011][APP-1013] focus outline and sitemap settings (#161) * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * update: video link (#167) * [APP-1051] Fix layout on the small and medium devices (#156) * fix: layout on the small and medium devices * update: change components to styled components * refactor: position settings wrapper into a separate component * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel (#169) * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1048] Add tooltip to accessibility statement (#159) * add: tooltip to accessibility statement * update: hide infotip when statement link is set * update: infotip's text * fix: infotip naming and logic * [APP-1049] Add back button accessibility statement (#164) * add: back button to the statement link section * add: Edit link button to statement page section * update: add admin_url and generate query args properly * update: learn more link for accessibility statement page (#168) * Fix: Update overlay height [n/a] (#171) * Fix settings and connect issues (#170) * fix: token fails to refresh after expiry * update: add 12 hour time for plan data refresh and fix missing subscription id * update: add check to refresh plan data * fix: decoding errors and alignment and add logging for errors * update: refresh logic and formatting * Update/app 1029 app name (#173) * update: plugin name * update: default menu option * update: menu structure * update: add inline checks * update: reduce padding on app icon in menu * fix: height of the modal * update: app menu icon color * update: menu icon colors * fix: menu icon size * update: plugin names * update: HELP_LINK * update: app name * update: icon background color * update: icon size * fix: admin icon size * fix: width of the sidebar * Fix/toggle not working properly (#174) * fix: toggles not working properly in some cases * fix: saving of the settings was not working * add: missing adminUrl in settings data * fix: switch was not working properly in some cases (#175) * Fix/app 1093 incorrect position on default (#176) * fix: switch was not working properly in some cases * fix: default setting structure for the icon position * [APP-1096] Text changes (#177) * fix: switch was not working properly in some cases * update: plugin name and action buttons title * fix: revert change to is_active function * fix: button color * New: Add the skip link [APP-1012] (#179) * [APP-1097] Fix preview load (#178) * [APP-1097] Fix preview load * [APP-1097] Fix preview load * [APP-1097] Fix preview load * Update modules/settings/assets/js/components/widget-loader/index.js --------- Co-authored-by: Raz Ohad <ohad@elementor.com> * [APP-1123] Accessibility statement text (#181) * fix: switch was not working properly in some cases * update: accessibility statement content * [APP-1121] Add support for react-jsx-runtime for older WP versions (#180) * fix: switch was not working properly in some cases * update: revert wp-scripts version to 28.0.0 to add support for older WordPress versions * update: revert wp-scripts to 27.9.0 * add: support for react-jsx-runtime in older versions of WordPress * update: version to the latest wp-scripts 30.3.0 * update: add lib/ to gitignore * update: plugin name * Fix: Fix admin widget previews [n/a] (#183) * [APP-1061] change mixpanel user id (#184) * [APP-1129] change toggle_event for mixpanel (#186) * Remove skip to content btn if anchor does not exist (#187) * fix: hide wp notices to keep the layout from shifting (#189) * [APP-1143] fix bug with capability display (#195) * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * add: loading text to widget preview (#196) * [APP-1142] add 'appType' super props, change identify key (#191) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1142] Add 'appType' super props * [APP-1144] Accessibility statement tooltip text update (#198) * update: text * update: switch design * Tweak: Update widget loaders [n/a] (#197) * added images to readme (#172) * added images to readme * updated readme * V3.0.0 * updated readme * updated tested up to * Fix: Update the skip link rendering hook [APP-1157] (#203) * bumped v3.0.1 (#206) * Fix: Adapt widget preview to smaller height viewports [APP-1130] (#217) * update: convert menu icon to base64 svg (#199) * update: convert menu icon to base64 svg * update: logo to svg logo with base64 encoded * update: svg app icon * [APP-1201] Improve admin panel accessibility (#220) * [APP-1201] add accessibility rules * [APP-1201] add accessibility rules * [APP-1210] add prop to Mixpanel, move event names to const (#225) * [APP-1159] Add mismatch URL flow (#210) * update: convert imports to named imports * add: function to check if current screen is settings page * update: rename elementor logo to app logo * add: url mismatch flow and components * update: remove obsolete code * Update modules/connect/rest/authorize.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * Update modules/settings/module.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * fix: modal was not closing * update: remove url mismatch notice * update: mismatch modal and rendering logic * add: toast notifications for errors * update: convert components into styled components * update: remove bottom border from the dialog * update: text copy * fix: logo alignment * update: renamed styled component --------- Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * [APP-1108][APP-1109][APP-1110] Add analytics backend logic (#190) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1101] Move action button to footer (#208) * update: add save changes footer to the bottom and remove it from capabilities * add: logic to save settings for skiptocontent using footer * update: text * update: convert component to styled component * [APP-1198] [APP-1199] Quota bar and notices (#219) * add: quota bar * add: openLink helper function * add: styled elements and visits link placeholder * update: remove hover state from the box * add: quota notices * update: quota access and usage calculations * add: logic to calculate plan usage * update: move logic to calculate plan usage to hook * add: todo note * add: todos * add: mixpanel events * fix: hide quota bar when sidebar is minimized * fix: settings panel was not expanding when sidebar is minimized * update: text and structure of the bar * update: quota calculation logic * update: remove TODOs * update: text and values * fix: height of the container for icon settings * update: golinks * update: golinks * fix: prevent icon options from wrapping on smaller screen sizes (#229) * [APP-1107] Add dashboard for analytics (#204) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1201] add accessibility rules * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] add check for is_active * update to the latest * update to the latest * update to the latest * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * [APP-1105] Add pro capabilities (#205) * add: volume and solid crown icon * add: volume and crown icons to export * update: refactor menu item to a new component * add: screen reader to the menu items and reorganize them * add: pro item infotip content * add: capabilities item and pro info tip to exports * update: import ProInfoTip component and change disabled logic * update: imports * update: refactor pro item infotip into the separate component * update: refactor infotip and add comments * add: custom switch component * add: logo settings layout * update: switch component * add: useToggleSetting hook to manage widget settings. * update: move pro feature key to a separate constant * fix: pro icon style * update: remove branding key * update: pro enable check structure * update: pro enabled check structure * update: key name * update: update key before checking for it * fix: null error * add: update logic to get the tools settings based on plan * update: exclude remove-elementor-label from the minimum option rule * update: add formlabel and eventnames * add: logic to deactivate the features which are disabled for the plan * fix: PHP warning * fix: keyword name * add: GOLINKS * add: open link function * fix: PHP warning undefined key * update: logic to show the icon and added golinks * [APP-1045] Add billing tab (#223) * add: plan name and subscription link * update: refactor my account menu * update: move truncate email to a helper file * update: simplify truncation logic * [APP-1270] Delete transient and force info update (#236) * add: force update site/info on mismatch url * update: add a constant for the transient * add: delete_transient for switch account as well * add: delete_transient for disconnect as well * [APP-1267] Quota bar undefined (#234) * fix: undefined was shown when there is no quota data * add: preloader * fix: make bottom bar sticky on the settings pages (#237) * [APP-1268] Pro tip spacing (#235) * fix: pro tip spacing * fix: pro icon * [APP-1271] Align menu icons (#238) * update: hide info button on minimized sidebar * fix: alignment of quota bar icon * fix: conditional logic * update: improve sidebar motion * fix: switch account issue * update: upgrade link for analytics popup (#239) * [APP-1281] fix usage percentage formatting (#240) * fix: format display of percentage correctly. * update: fraction conversion logic * Force referer and lower transient time to 15 minutes [APP-1286] (#242) * reduce transient timeout * force referrer in script tags * [APP-1262] Enable routes for get statistic on disabled analytics (#233) * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1243] Admin upgrade notices (#241) * add: admin quota notices * add: fix function name and phpcs issues * fix: formatting issues * [APP-1287] change Mixpanel check for free trial (#243) * Fix/quota text (#244) * fix: wp notice close logic plus banner text * update: banner text * [APP-1292] missing mixpanel events (#245) * add: missing mixpanel events * update: use variable for hardcoded names * update: use variable for hardcoded names * [APP-1293] Add additional checks (#246) * update: add additional check to prevent fatal error * fix: formatting * [APP-1312] minimize client css (#252) * [APP-1168] widget icon radius * add: icon radius component * add: icon radius component * update: add support for widget radius * fix: minor ui fixes * fix: resolve comments * fix: alignment of the icon * update: add styled components * add: corner radius mixpanel event * fix: corner radius should have default values when no value is set based on icon * fix: icon radius input style * add: accessibility attributes * fix: active states color * add: logic to control invalid inputs * update: make aria attributes translatable * update: styled component names * add: spacing between the components * [APP-1342] add super props, store plan scope after register/switch (#250) * [APP-0000] store plan scope after register/switch * Update modules/settings/module.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * remove deprecated method * remove deprecated method * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel --------- Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * [Legacy] Added strict settings sanitization (#257) * [Legacy] Added strict settings sanitization * use correct esc_x method * hardcoded 6.8.0 * added svn for wp test library * fix: default border radius (#258) * fix: default border radius * add: default corner radius for new users * update: add support for default values for users with saved style settings * updated phpunit workflow * revert to master * hardcode 6.8.x * update: default values for existing users * update: remove saving default corner radius for new users * fix: update default radius for text icon * fix: PHPUnit tests for WP 6.8.0 * align with develop * set to latest --------- Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: Raz Ohad <ohad@elementor.com> * fix: widget icon spacing (#262) * Added custom gutenberg link to toggle widget [APP-1306] (#256) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] (#254) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] * typo Update modules/widget/components/ally-trigger.php * New: Add the what's new functionality [APP-1329] (#264) * add: statement page selector field (#261) * add: statement page selector field * add: updated the statement link button to a search field * fix: add support for create statement data * New: Bump the Notifications SDK to 1.2.0 [APP-1427] (#267) * Fix: Resolve a11y issues [APP-1331] (#269) * [APP-1417] Add support for custom icon (#270) * add: media upload button * add: support for custom icon * fix: code alignment, phpcs * fix: code alignment and linting * add: mixpanel events * fix: styling of custom svg * fix: missing variable * fix: missing variable * fix: load gutenberg block without css * fix: icon spacing in preview * fix: indentation * fix: indents * [APP-1440] Fix doing_it_wrong warning for translations (#271) * fix: doing_it_wrong warning for translations * update: stop explicitly loading translations * fix: add package-lock * fix: add package-lock * New: Store fonts inside the plugin [APP-1385] (#277) * add: what's new mixpanel event (#274) * fix:disable autofocus on opening of popup menu (#279) * New: Add the birthday banner [APP-1489] (#281) * [APP-1442] Add language selector option to plugin (#273) * add: language selector option * update: language selector option key * update: lang selector name (#284) * update: add language selector to analytics table (#285) * Tweak: Update the campaign's time range [APP-1489] (#283) * fix: container width logic (#292) * [APP-1530] scrollbars settings width (#296) * update: title layout * fix: width of the content * update: browserlist * fix: rtl issues (#304) * [APP-1629] Fix pro icon (#305) * update: @elementor/ui package * fix: pro icon * fix: pro icon * [APP-1678] Remove mixpanel session replay (#317) * Fix: plugin headers (#316) (#320) * [APP-907] Accessibility assistant (#326) * PHPCS and remediation POC WIP * WIP Wizard module * Added scanner module * [APP-929][APP-930] Add initial setup for wizard, added btn to the topbar (#230) * [APP-929][APP-930] * [APP-929][APP-930] * update logic * update init app * [APP-0000] store plan scope after register/switch * change return of load * add header * Move into shadow dom, add context, add headers components * add UI components * add UI components * add UI components * merge current develop * merge current develop * Add AltText Form * Add scroll to current element * Align with current design, add loader, added preview for svg * Align with current design, add loader, added preview for svg * Resolve comments * Resolve comments * Resolve comments * [APP-934] add submit logic (#259) * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * Added replace remediation action * Add submit logic * Add submit alt text logic, generate AI alt text * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation --------- Co-authored-by: Raz Ohad <admin@bainternet.info> * Add texts, add remediation submit, fix logic to store remediation * [APP-0000] add store request to the Service API (#268) * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-1432] fix with AI flow (#275) * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1446] sidebar menu update (#276) * update: simplify menu * add: headings and scanner menu options * [APP-945] add column for tables (#282) * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-1447] Updated quota bar designs (#278) * update: quota bar designs * fix: the popover was partially visible * update: AI credits name * update: usage calculation logic * add: quota indicators * update: quotas tooltip text * update: quotas notices text * update: make toggle icon dynamic * fix: @elementor/ui imports * Update modules/settings/assets/js/layouts/quota-bar.js Co-authored-by: VasylD <vasyld@elementor.red> * update: styling of component --------- Co-authored-by: VasylD <vasyld@elementor.red> * [APP-1507] add UI changes (#286) * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1387] add mixpanel events (#288) * [APP-1387] add mixpanel events * [APP-1387] add mixpanel events * New: Add the a11y assistant dashboard's UI [APP-1445] (#289) * [APP-1513] add disconnected msg (#290) * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues (#291) * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * fix: infotip icon padding and font style (#293) * fix: infotip icon padding and font style * fix: infotip icon padding and font style * update: caniuse database * [APP-1525] add edit mode (#294) * [APP-1525] add edit mode * [APP-1525] add edit mode * [APP-1525] add edit mode * Bug/app 1544 (#295) * Fix: Resolve QA comments [APP-1544] * New: Add beta tags [APP-1555] * New: Add the "no results" state [APP-1544] * [APP-1554] rename violations (#297) * [APP-1512] add backend logic for remediation management (#298) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Fix: Resolve QA comments [n/a] (#299) * [APP-1512] add FE remediation management (#300) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1609] fix tooltip * [APP-1609] fix resolved btn click * [APP-1401] clear cache on update (#302) * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * update with latest develop branch * fix copies * [APP-1619] add mixpanel event (#303) * [APP-1619] add mixpanel event * [APP-1619] add mixpanel event * [APP-1593] Add locked variant for quota bar (#301) * update: add locked version of quota status bar * fix: text color for infotip * fix: width issues * fix: add check for 0 * [APP-1637][APP-1643] add UI fixes, add excluded rules array (#307) * fix: make sidebar collapsible (#306) * Merge current dev * [APP-1603] Add dashboard menu (#309) * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * Bug/app 1607 (#311) * Fix: Update stats calculation logic [APP-1607] * Fix: Set fixed width for the results table [APP-1650] * Fix: Update filter rules [APP-1634] * New: Add the no search results state [APP-1651] * Fix: Convert indents [n/a] * [APP-1670] add menu on Manage Fixes (#315) * [APP-1670] add menu on Manage Fixes * [APP-1670] update menu * [APP-1611] fix comments * fix: direction of snippet (#313) * [APP-1561] New menu layout (#308) * update: app menu and layout * merge: latest changes from feature/remediation * add: alert indicator to the closed sidebar * fix: page layout for statement page * update: menu display names * fix: topbar menu layout * update: sidebar menu width * update: sidebar menu width * fix: popup menu layout * add: hover action to the toggle button * update: my account menu * fix: quota indicator for closed sidebar * fix: icon alignments * fix: scroll behaviour * fix: page scroll behaviour * fix: popup menu hover state * update: quota bar and group layouts * add: tooltips to the menu items * update: make scans page fixed height and scrollable * update: styles with theme references and added new styled components * fix: make sidebar smoother * update: accessibility page heading * Merge latest develop * [APP-1611] trigger save entry for clean cache (#314) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async (#319) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * fix: scrollbar issues (#318) * [APP-1615] add remediation for wp image (#321) * POC - FrontEnd remediations to handle Dynamic Data [APP-1644] (#312) * POC - FrontEnd remediations to handle Dynamic Data * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * added MutationObserver to cover elements that are added later on the page runs until remediations are all done, and disconnect * added $use_frontend flag instead of using "false" * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * WIP on poc/fe-remediations * [APP-0000] call trigger save async * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Small fixes * Small fixes * Small fixes * Small fixes --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> Co-authored-by: vasyldinets <vasyld@elementor.red> * [APP-1611] Fix cache issue (#324) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * [APP-1611] clear cache * [APP-1657] upgrade cta (#323) * update: added logic to show button based on plan * Update modules/settings/assets/js/components/quota-bar/quota-bar-group.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * fix: eslint error --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1658] Update accessibility admin column design (#322) * update: wpadmin column layout * update: move icon to assets * Fix: Resolve remediation encoding issue [APP-1646] (#325) --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1698] Update referrer policy (#333) * [APP-1697] fix menu, add category to events as key without translation (#334) * [APP-1697] fix menu, add category to events as key without translation * [APP-1697] fix menu, add category to events as key without translation * [APP-1717] Fix category title (#335) * [APP-1724] Fix get object type for singular (#338) * [APP-1724] Fix get object type for singular * [APP-1724] Fix get object type for singular * Update modules/remediation/classes/utils.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Fix: Resolve some a11y issues [APP-1664] (#337) * [APP-1696] Fix help menu ui (#339) * fix: menu ui * update: onclick action * fix: alignment of the menu * update: rename menu item to accessibility assistant * Fix: Use the same issue count in the WP admin and scanner [APP-1726] (#341) * Fix: Move data tag logic away from the component to prevent multiple renders [APP-1502] (#342) * [APP-1738] add case-insensitive replace (#345) * [APP-1738] add case-insensitive replace * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1741][APP-1742][APP-1743] add components, calc contrast ratio, add logic for lightness * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * update * update * update --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Release/v3.5.1 (#349) (#351) * Bump WP version * ♻️ Initial Refactor commit [APP-687] (#109) * Initial refactor commit * ✅ Added build and tests CI/CD * PR Rejects * Rejects leftover * Setup base (#110) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: settings variable * update: removed duplicate css import * Update modules/settings/assets/js/api/index.js --------- * [Infra] ✅ updated Github actions (#114) * updated github actions * removed composer github auth * PHPCS * removed package-lock.json from ignore to allow `npm ci` * added missing husky * ignore legacy * removed unused non existing import * Add connect modal (#111) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * fix: alignment and style * update: imports * update: removed conflicting imports * fix: add compatibility for mobile devices --------- * [APP 705] add connect module, settings and notification component (#112) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports --------- * [APP 707] general setting components (#113) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * Update modules/settings/assets/js/components/color-picker/style.css * update: color picker class name --------- * [App 780] Navigation Sidebar (#115) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * update: added translations * fix: admin top bar layout * update: exports of icons * update: exports of components * add: aliases for imports and fix exports * fix: height and styling of the layout * fix: unhide wp footer * update: keep widget menu open on page load (default) * update: linter rules to move first prop to new line * update: linter rules to move first prop to new line --------- * Fix error on install plugin, add prettier (#116) * Feature/app 810 assemble icon settings page (#117) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * Update modules/settings/assets/js/components/color-picker/style.css * update: color picker class name * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * add: props to wrapper * add: icon design and position setting layouts * add: in page scroll behaviour to the settings * add: widget icons and getter function * update: icon design settings getter and setter functions * update: imports * add: mobile layout for position settings * add: icon position settings * add: icon position settings hooks and handlers * fix: alignment of controls in AlignmentMatrixControl * update: useSettings and usePositionSetting hooks and relevant functions * fix: colors of AlignmentMatrixControl * fix: styling of components and layouts * add: aliases * add: container wrapper to page * update: accessibility options rendering logic * fix: order of the icons * add: aliases for components and hooks imports * fix: styling of settings panel * fix: container height for settings page * update: toggle control states * add: widget icon settings * add: load saved widget icon settings * update: move layout to page for different designs per page * update: add changes tracking and disable button logic * add: async/await to save settings * update: convert options to array of objects * Update modules/settings/assets/js/components/bottom-bar/index.js * Update modules/settings/assets/js/app.js * fix: remove duplicate entries --------- * Feature/app 708 widget menu settings (#118) * add: icons for menu settings * add: placeholder layout for widget preview in menu settings * update: load saved settings and updated imports * add: logics for handling and saving menu settings * add: useSavedSettings hook * update: set export as default for Sidebar layout * add: widget menu settings layout and settings * update: add widget menu settings and widget preview layouts * add: hide/show minimum option alert notification * update: styling of the save button * update: save settings logic to use async/await * fix: accessibility text icon * update: app type (#119) * [APP-834] Update account menu buttons (#121) * update: account menu buttons * update: billing link * add: error handling for switch account * [APP-835] add service data (#122) * add: client functions * add: site register and site info endpoints * update: add plan data settings * update: add support for 201 response code * update: add plan data key * update: store the plan data on the once the site is registered * update: add filter for client url * add: retry registering in there is any error after connect * update: setting prefix * add: plan data * update: add account details to menu * fix: lint issues * update: add data checkbox support (#123) * [APP-928] Settings pointer (#125) * add: settings pointer * update: add alias for the settings * [APP-837] Add post connect modal (#120) * add: post connect modal * update: settings prefix * fix: connect modal design * update: connect modal text * add: connect modal graphics * update: connect modal icon * update: post connect modal * update: sidebar menu text * update: text of icon settings * update: text * update: php compatibility with return types * add: accessibility statement page structure (#126) * [APP-721] Render widget and global settings (#124) * add: webhook endpoint * add: widget module * add: default widget settings on successful registration * update: name of global object to ea11yWidget * update: remove json encoding to make objects available on the frontend * update: widget url, filter and enqueuing method * update: removed obsolete code * update: enqueue script only when connected * update: add check for valid plan data and key * update: conditional check * update: conditional check * fix: widget loading error (#128) * [Legacy] Upgrade To New [APP-949] (#127) * Added `Notice_Base` and `Notices` component to core module * Always load core module and load all other modules based on legacy status * added filter in customizer settings * added bubble / pimple in admin menu to indicate upgrade * added `Dismissible_Deprecated_Nag` notice to none legacy pages * added `Dismissible_Deprecated_Nag` notice to legacy pages * Added `Upgrade` component to legacy module includes: * loading of notices * introduction modal * admin menu pimple * customizer notice * pointer * confirmation modal * upgrade logic and handler * ✅ Fixed legacy module test * added `local:quick-run` command to run in browser mode * update phpunit workflow * ensure wp.ajax is loaded * wrong translations * Updated strings * added "Equally" * remove unused test * ✅ use custom version of wp test library (#129) * ✅ use custom version of wp test library * cleanup * update WP versions for testing * [APP-711] Widget preview (#130) * add: dynamic script loader for widget * update: settings name * update: settings save function and comments * update: tools settings object structure * add: widget preview section * update: added setting page slug as a constant * update: enqueue widget for preview in the settings * add: widget icon assets link * add: widget icon svgs * update: store widget url in a constant * update: store widget url in a constant * update: trigger widget preview update on menu item changes * update: remove the icon option from the frontend. * update: add widget URL * update: plan data setting type * update: widget plan url * update: widget plan url and parse plan data * fix: phpcs error ext-json missing * fix: widget url * fix: save and use plan data as a serialized option * fix: use template string for widget url * [APP-908] Accessibility generator (#131) * add: accessibility statement radio icons * update: add form group on radio buttons * add: statement generator * add: statement generator * add: accessibility statement data option * update: create page in WordPress and save it to the option * update: exclude zip file from the git * update: render statement page conditionally * add: statement link layout and settings * add: preload statement data * update: publish the created page and add link for it * update: changed Dynamic Script Loader to WidgetLoader * add: accessibility statement url * update: text and styling * update: styling of the preview text * update: restructure statement generator * add: support for dynamic update in statement links * update: remove index.css file for widget loader * add: widget styling for settings page * add: empty link when hide link is enabled * update: statement page structure and logic * fix: typo * update: convert component into a styled component * fix: styling and layout * update: icons * update: convert radio buttons to styled component * fix: typo and style * add: fading for the link preview * update: import * update: styling and spacing * fix: sidebar layout * update: wpcs to latest version * fix: spacing * fix: wpcs version * add: check for valid statement page * fix: jitters on rendering * fix: use escape attribute * update: settings menu slug and plugin name * fix: menu item rendering * update: definition of the styled text field * add: addPage function to the API * fix: add notification on page creation * add: copy link icon * update: optimize SVGs * [APP-908] Additional fixes (#133) * fix: text domains * updated: styled component syntax * update: use await instead of then * fix: prevent application crash in case widget fails to load * add: generated info tip card * update: refactor function * Fix: Fix the QA bugs [n/a] (#135) * [APP-830] Add mixpanel events (#134) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel (#136) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] rename events (#137) * Connect and Preview Fixes (#139) * updated connect admin page * Use unified widget URL instead of hardcoded Js to support envs * Removed enqueue of fictional widget.js and reuse settings `admin` handle * Fix: Fix the QA bugs [n/a] (#138) * New: Finish the BE integration [n/a] * Fix: Fix some bugs [n/a] * upgrade flow UI and design tweaks [app-949] (#141) * Updated Learn More links with UTM's * Tweaked Pointer strings Icon and CTA * dismissible notice strings * sticky notice strings * updated upgrade flow design for pointer, notices, introduction modal, and confirmation modal * added build script * [APP-979] Update links and plugin name (#140) * Ensure loading of legacy widget based on any saved data and fixed legacy JS * Bug/app 1002 (#143) * Bug: Update the logo in the "Hide Widget" modal [APP-1001] * Fix: Update the side menu spaces [APP-1002] * [APP-991] Add translation for statement (#142) * [APP-979] Update links and plugin name * [APP-991] Add translation for statement * Set Prod Widget URL * [APP-1004][APP-1005][APP-1006] Fix generator UI and logic, fix statement UI, fix copy link (#144) * [APP-1004] Fix generator UI and logic * [APP-1005] Fix statement UI * [APP-1005] Fix statement UI * Mixpanel record session * Fix: Enhance position values validation [APP-1009] (#146) * Bug/app 1003 (#147) * Fix: Add a border to the preview [n/a] * Fix: Fix Capabilities screen UI [APP-1003] * [APP-1020] add missed events (#148) * [APP-1015] fix switch account (#149) * [APP-1015] fix switch account (#150) * [APP-1021] Fix switch modal ui (#151) * fix: ui issues * fix: translation strings * [APP-912] add default settings for RTL (#152) * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-1026] Remove HTML breaking <style> tag & update pointer logic (#153) * fix: remove extra closing tag * update: hide settings pointer when plugin settings is opened * update: remove unused functions * update: add help text to mobile position settings * Bug/app 1003 (#157) * Fix: Add missed translations [n/a] * Fix: Refresh the plan data on page load [n/a] * New: Add loader to the settings [n/a] * update: delete lock key after each check (#160) * New: Update dashboard icon size [n/a] (#158) * New: Update dashboard icon size [n/a] * Fix: Fix widget previews [n/a] * [APP-1018] Help menu change (#155) * update: remove accessibility word from menu items * update: remove top bar * update: add help button to the sidebar * update: re-add spacing in styled css code * update: create styled components * [APP-973] Add an UTM for users upgrading from one click to the new widget (#165) * update: ui of the statement preview (#166) * [APP-1011][APP-1013] focus outline and sitemap settings (#161) * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * update: video link (#167) * [APP-1051] Fix layout on the small and medium devices (#156) * fix: layout on the small and medium devices * update: change components to styled components * refactor: position settings wrapper into a separate component * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel (#169) * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1048] Add tooltip to accessibility statement (#159) * add: tooltip to accessibility statement * update: hide infotip when statement link is set * update: infotip's text * fix: infotip naming and logic * [APP-1049] Add back button accessibility statement (#164) * add: back button to the statement link section * add: Edit link button to statement page section * update: add admin_url and generate query args properly * update: learn more link for accessibility statement page (#168) * Fix: Update overlay height [n/a] (#171) * Fix settings and connect issues (#170) * fix: token fails to refresh after expiry * update: add 12 hour time for plan data refresh and fix missing subscription id * update: add check to refresh plan data * fix: decoding errors and alignment and add logging for errors * update: refresh logic and formatting * Update/app 1029 app name (#173) * update: plugin name * update: default menu option * update: menu structure * update: add inline checks * update: reduce padding on app icon in menu * fix: height of the modal * update: app menu icon color * update: menu icon colors * fix: menu icon size * update: plugin names * update: HELP_LINK * update: app name * update: icon background color * update: icon size * fix: admin icon size * fix: width of the sidebar * Fix/toggle not working properly (#174) * fix: toggles not working properly in some cases * fix: saving of the settings was not working * add: missing adminUrl in settings data * fix: switch was not working properly in some cases (#175) * Fix/app 1093 incorrect position on default (#176) * fix: switch was not working properly in some cases * fix: default setting structure for the icon position * [APP-1096] Text changes (#177) * fix: switch was not working properly in some cases * update: plugin name and action buttons title * fix: revert change to is_active function * fix: button color * New: Add the skip link [APP-1012] (#179) * [APP-1097] Fix preview load (#178) * [APP-1097] Fix preview load * [APP-1097] Fix preview load * [APP-1097] Fix preview load * Update modules/settings/assets/js/components/widget-loader/index.js --------- * [APP-1123] Accessibility statement text (#181) * fix: switch was not working properly in some cases * update: accessibility statement content * [APP-1121] Add support for react-jsx-runtime for older WP versions (#180) * fix: switch was not working properly in some cases * update: revert wp-scripts version to 28.0.0 to add support for older WordPress versions * update: revert wp-scripts to 27.9.0 * add: support for react-jsx-runtime in older versions of WordPress * update: version to the latest wp-scripts 30.3.0 * update: add lib/ to gitignore * update: plugin name * Fix: Fix admin widget previews [n/a] (#183) * [APP-1061] change mixpanel user id (#184) * [APP-1129] change toggle_event for mixpanel (#186) * Remove skip to content btn if anchor does not exist (#187) * fix: hide wp notices to keep the layout from shifting (#189) * [APP-1143] fix bug with capability display (#195) * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * add: loading text to widget preview (#196) * [APP-1142] add 'appType' super props, change identify key (#191) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1142] Add 'appType' super props * [APP-1144] Accessibility statement tooltip text update (#198) * update: text * update: switch design * Tweak: Update widget loaders [n/a] (#197) * added images to readme (#172) * added images to readme * updated readme * V3.0.0 * updated readme * updated tested up to * Fix: Update the skip link rendering hook [APP-1157] (#203) * bumped v3.0.1 (#206) * Fix: Adapt widget preview to smaller height viewports [APP-1130] (#217) * update: convert menu icon to base64 svg (#199) * update: convert menu icon to base64 svg * update: logo to svg logo with base64 encoded * update: svg app icon * [APP-1201] Improve admin panel accessibility (#220) * [APP-1201] add accessibility rules * [APP-1201] add accessibility rules * [APP-1210] add prop to Mixpanel, move event names to const (#225) * [APP-1159] Add mismatch URL flow (#210) * update: convert imports to named imports * add: function to check if current screen is settings page * update: rename elementor logo to app logo * add: url mismatch flow and components * update: remove obsolete code * Update modules/connect/rest/authorize.php * Update modules/settings/module.php * fix: modal was not closing * update: remove url mismatch notice * update: mismatch modal and rendering logic * add: toast notifications for errors * update: convert components into styled components * update: remove bottom border from the dialog * update: text copy * fix: logo alignment * update: renamed styled component --------- * [APP-1108][APP-1109][APP-1110] Add analytics backend logic (#190) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1101] Move action button to footer (#208) * update: add save changes footer to the bottom and remove it from capabilities * add: logic to save settings for skiptocontent using footer * update: text * update: convert component to styled component * [APP-1198] [APP-1199] Quota bar and notices (#219) * add: quota bar * add: openLink helper function * add: styled elements and visits link placeholder * update: remove hover state from the box * add: quota notices * update: quota access and usage calculations * add: logic to calculate plan usage * update: move logic to calculate plan usage to hook * add: todo note * add: todos * add: mixpanel events * fix: hide quota bar when sidebar is minimized * fix: settings panel was not expanding when sidebar is minimized * update: text and structure of the bar * update: quota calculation logic * update: remove TODOs * update: text and values * fix: height of the container for icon settings * update: golinks * update: golinks * fix: prevent icon options from wrapping on smaller screen sizes (#229) * [APP-1107] Add dashboard for analytics (#204) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1201] add accessibility rules * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] add check for is_active * update to the latest * update to the latest * update to the latest * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * [APP-1105] Add pro capabilities (#205) * add: volume and solid crown icon * add: volume and crown icons to export * update: refactor menu item to a new component * add: screen reader to the menu items and reorganize them * add: pro item infotip content * add: capabilities item and pro info tip to exports * update: import ProInfoTip component and change disabled logic * update: imports * update: refactor pro item infotip into the separate component * update: refactor infotip and add comments * add: custom switch component * add: logo settings layout * update: switch component * add: useToggleSetting hook to manage widget settings. * update: move pro feature key to a separate constant * fix: pro icon style * update: remove branding key * update: pro enable check structure * update: pro enabled check structure * update: key name * update: update key before checking for it * fix: null error * add: update logic to get the tools settings based on plan * update: exclude remove-elementor-label from the minimum option rule * update: add formlabel and eventnames * add: logic to deactivate the features which are disabled for the plan * fix: PHP warning * fix: keyword name * add: GOLINKS * add: open link function * fix: PHP warning undefined key * update: logic to show the icon and added golinks * [APP-1045] Add billing tab (#223) * add: plan name and subscription link * update: refactor my account menu * update: move truncate email to a helper file * update: simplify truncation logic * [APP-1270] Delete transient and force info update (#236) * add: force update site/info on mismatch url * update: add a constant for the transient * add: delete_transient for switch account as well * add: delete_transient for disconnect as well * [APP-1267] Quota bar undefined (#234) * fix: undefined was shown when there is no quota data * add: preloader * fix: make bottom bar sticky on the settings pages (#237) * [APP-1268] Pro tip spacing (#235) * fix: pro tip spacing * fix: pro icon * [APP-1271] Align menu icons (#238) * update: hide info button on minimized sidebar * fix: alignment of quota bar icon * fix: conditional logic * update: improve sidebar motion * fix: switch account issue * update: upgrade link for analytics popup (#239) * [APP-1281] fix usage percentage formatting (#240) * fix: format display of percentage correctly. * update: fraction conversion logic * Force referer and lower transient time to 15 minutes [APP-1286] (#242) * reduce transient timeout * force referrer in script tags * [APP-1262] Enable routes for get statistic on disabled analytics (#233) * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1243] Admin upgrade notices (#241) * add: admin quota notices * add: fix function name and phpcs issues * fix: formatting issues * [APP-1287] change Mixpanel check for free trial (#243) * Fix/quota text (#244) * fix: wp notice close logic plus banner text * update: banner text * [APP-1292] missing mixpanel events (#245) * add: missing mixpanel events * update: use variable for hardcoded names * update: use variable for hardcoded names * [APP-1293] Add additional checks (#246) * update: add additional check to prevent fatal error * fix: formatting * [APP-1312] minimize client css (#252) * [APP-1168] widget icon radius * add: icon radius component * add: icon radius component * update: add support for widget radius * fix: minor ui fixes * fix: resolve comments * fix: alignment of the icon * update: add styled components * add: corner radius mixpanel event * fix: corner radius should have default values when no value is set based on icon * fix: icon radius input style * add: accessibility attributes * fix: active states color * add: logic to control invalid inputs * update: make aria attributes translatable * update: styled component names * add: spacing between the components * [APP-1342] add super props, store plan scope after register/switch (#250) * [APP-0000] store plan scope after register/switch * Update modules/settings/module.php * remove deprecated method * remove deprecated method * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel --------- * [Legacy] Added strict settings sanitization (#257) * [Legacy] Added strict settings sanitization * use correct esc_x method * hardcoded 6.8.0 * added svn for wp test library * fix: default border radius (#258) * fix: default border radius * add: default corner radius for new users * update: add support for default values for users with saved style settings * updated phpunit workflow * revert to master * hardcode 6.8.x * update: default values for existing users * update: remove saving default corner radius for new users * fix: update default radius for text icon * fix: PHPUnit tests for WP 6.8.0 * align with develop * set to latest --------- * fix: widget icon spacing (#262) * Added custom gutenberg link to toggle widget [APP-1306] (#256) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] (#254) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] * typo Update modules/widget/components/ally-trigger.php * New: Add the what's new functionality [APP-1329] (#264) * add: statement page selector field (#261) * add: statement page selector field * add: updated the statement link button to a search field * fix: add support for create statement data * New: Bump the Notifications SDK to 1.2.0 [APP-1427] (#267) * Fix: Resolve a11y issues [APP-1331] (#269) * [APP-1417] Add support for custom icon (#270) * add: media upload button * add: support for custom icon * fix: code alignment, phpcs * fix: code alignment and linting * add: mixpanel events * fix: styling of custom svg * fix: missing variable * fix: missing variable * fix: load gutenberg block without css * fix: icon spacing in preview * fix: indentation * fix: indents * [APP-1440] Fix doing_it_wrong warning for translations (#271) * fix: doing_it_wrong warning for translations * update: stop explicitly loading translations * fix: add package-lock * fix: add package-lock * New: Store fonts inside the plugin [APP-1385] (#277) * add: what's new mixpanel event (#274) * fix:disable autofocus on opening of popup menu (#279) * New: Add the birthday banner [APP-1489] (#281) * [APP-1442] Add language selector option to plugin (#273) * add: language selector option * update: language selector option key * update: lang selector name (#284) * update: add language selector to analytics table (#285) * Tweak: Update the campaign's time range [APP-1489] (#283) * fix: container width logic (#292) * [APP-1530] scrollbars settings width (#296) * update: title layout * fix: width of the content * update: browserlist * fix: rtl issues (#304) * [APP-1629] Fix pro icon (#305) * update: @elementor/ui package * fix: pro icon * fix: pro icon * [APP-1678] Remove mixpanel session replay (#317) * Fix: plugin headers (#316) (#320) * [APP-907] Accessibility assistant (#326) * PHPCS and remediation POC WIP * WIP Wizard module * Added scanner module * [APP-929][APP-930] Add initial setup for wizard, added btn to the topbar (#230) * [APP-929][APP-930] * [APP-929][APP-930] * update logic * update init app * [APP-0000] store plan scope after register/switch * change return of load * add header * Move into shadow dom, add context, add headers components * add UI components * add UI components * add UI components * merge current develop * merge current develop * Add AltText Form * Add scroll to current element * Align with current design, add loader, added preview for svg * Align with current design, add loader, added preview for svg * Resolve comments * Resolve comments * Resolve comments * [APP-934] add submit logic (#259) * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * Added replace remediation action * Add submit logic * Add submit alt text logic, generate AI alt text * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation --------- * Add texts, add remediation submit, fix logic to store remediation * [APP-0000] add store request to the Service API (#268) * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-1432] fix with AI flow (#275) * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1446] sidebar menu update (#276) * update: simplify menu * add: headings and scanner menu options * [APP-945] add column for tables (#282) * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-1447] Updated quota bar designs (#278) * update: quota bar designs * fix: the popover was partially visible * update: AI credits name * update: usage calculation logic * add: quota indicators * update: quotas tooltip text * update: quotas notices text * update: make toggle icon dynamic * fix: @elementor/ui imports * Update modules/settings/assets/js/layouts/quota-bar.js * update: styling of component --------- * [APP-1507] add UI changes (#286) * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1387] add mixpanel events (#288) * [APP-1387] add mixpanel events * [APP-1387] add mixpanel events * New: Add the a11y assistant dashboard's UI [APP-1445] (#289) * [APP-1513] add disconnected msg (#290) * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues (#291) * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * fix: infotip icon padding and font style (#293) * fix: infotip icon padding and font style * fix: infotip icon padding and font style * update: caniuse database * [APP-1525] add edit mode (#294) * [APP-1525] add edit mode * [APP-1525] add edit mode * [APP-1525] add edit mode * Bug/app 1544 (#295) * Fix: Resolve QA comments [APP-1544] * New: Add beta tags [APP-1555] * New: Add the "no results" state [APP-1544] * [APP-1554] rename violations (#297) * [APP-1512] add backend logic for remediation management (#298) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php * Update modules/remediation/rest/items.php * [APP-1512] add backend logic for remediation management --------- * Fix: Resolve QA comments [n/a] (#299) * [APP-1512] add FE remediation management (#300) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php * Update modules/remediation/rest/items.php * [APP-1512] add backend logic for remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management --------- * [APP-1609] fix tooltip * [APP-1609] fix resolved btn click * [APP-1401] clear cache on update (#302) * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * update with latest develop branch * fix copies * [APP-1619] add mixpanel event (#303) * [APP-1619] add mixpanel event * [APP-1619] add mixpanel event * [APP-1593] Add locked variant for quota bar (#301) * update: add locked version of quota status bar * fix: text color for infotip * fix: width issues * fix: add check for 0 * [APP-1637][APP-1643] add UI fixes, add excluded rules array (#307) * fix: make sidebar collapsible (#306) * Merge current dev * [APP-1603] Add dashboard menu (#309) * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * Bug/app 1607 (#311) * Fix: Update stats calculation logic [APP-1607] * Fix: Set fixed width for the results table [APP-1650] * Fix: Update filter rules [APP-1634] * New: Add the no search results state [APP-1651] * Fix: Convert indents [n/a] * [APP-1670] add menu on Manage Fixes (#315) * [APP-1670] add menu on Manage Fixes * [APP-1670] update menu * [APP-1611] fix comments * fix: direction of snippet (#313) * [APP-1561] New menu layout (#308) * update: app menu and layout * merge: latest changes from feature/remediation * add: alert indicator to the closed sidebar * fix: page layout for statement page * update: menu display names * fix: topbar menu layout * update: sidebar menu width * update: sidebar menu width * fix: popup menu layout * add: hover action to the toggle button * update: my account menu * fix: quota indicator for closed sidebar * fix: icon alignments * fix: scroll behaviour * fix: page scroll behaviour * fix: popup menu hover state * update: quota bar and group layouts * add: tooltips to the menu items * update: make scans page fixed height and scrollable * update: styles with theme references and added new styled components * fix: make sidebar smoother * update: accessibility page heading * Merge latest develop * [APP-1611] trigger save entry for clean cache (#314) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async (#319) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * fix: scrollbar issues (#318) * [APP-1615] add remediation for wp image (#321) * POC - FrontEnd remediations to handle Dynamic Data [APP-1644] (#312) * POC - FrontEnd remediations to handle Dynamic Data * Update modules/remediation/components/remediation-runner.php * added MutationObserver to cover elements that are added later on the page runs until remediations are all done, and disconnect * added $use_frontend flag instead of using "false" * Update modules/remediation/components/remediation-runner.php * WIP on poc/fe-remediations * [APP-0000] call trigger save async * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Small fixes * Small fixes * Small fixes * Small fixes --------- * [APP-1611] Fix cache issue (#324) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * [APP-1611] clear cache * [APP-1657] upgrade cta (#323) * update: added logic to show button based on plan * Update modules/settings/assets/js/components/quota-bar/quota-bar-group.js * fix: eslint error --------- * [APP-1658] Update accessibility admin column design (#322) * update: wpadmin column layout * update: move icon to assets * Fix: Resolve remediation encoding issue [APP-1646] (#325) --------- * [APP-1698] Update referrer policy (#333) * [APP-1697] fix menu, add category to events as key without translation (#334) * [APP-1697] fix menu, add category to events as key without translation * [APP-1697] fix menu, add category to events as key without translation * [APP-1717] Fix category title (#335) * [APP-1724] Fix get object type for singular (#338) * [APP-1724] Fix get object type for singular * [APP-1724] Fix get object type for singular * Update modules/remediation/classes/utils.php --------- * Fix: Resolve some a11y issues [APP-1664] (#337) * [APP-1696] Fix help menu ui (#339) * fix: menu ui * update: onclick action * fix: alignment of the menu * update: rename menu item to accessibility assistant * Fix: Use the same issue count in the WP admin and scanner [APP-1726] (#341) * Fix: Move data tag logic away from the component to prevent multiple renders [APP-1502] (#342) * [APP-1738] add case-insensitive replace (#345) * [APP-1738] add case-insensitive replace * Update modules/remediation/assets/js/actions/replace.js * Update modules/remediation/assets/js/actions/replace.js * [APP-1741][APP-1742][APP-1743] add components, calc contrast ratio, add logic for lightness * Update modules/remediation/assets/js/actions/replace.js * update * update * update --------- * bumped v3.5.1 * [APP-1776] Deactivate scanner on not connected (#350) --------- Co-authored-by: Yakir Sitbon <kingyes1@gmail.com> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: VasylD <vasyld@elementor.red> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1741][APP-1742][APP-1743] add components, calc contrast ratio, a… (#346) * [APP-1741][APP-1742][APP-1743] add components, calc contrast ratio, add logic for lightness * Update modules/scanner/assets/js/components/color-contrast-form/color-set.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * update * update * Remove shadow dom, add color picker * Remove shadow dom, add color picker * Remove shadow dom, add color picker * Update modules/scanner/assets/js/layouts/color-contrast-layout.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/scanner/assets/js/components/color-contrast-form/color-set.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/scanner/assets/js/components/color-contrast-form/color-set.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/scanner/assets/js/layouts/color-contrast-layout.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/scanner/assets/js/utils/calc-color-ratio.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Remove shadow dom, add color picker * Remove shadow dom, add color picker * Revert shadow dom, include styles for color picker * Revert shadow dom, include styles for color picker --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * New: Add new Styles FE remediation [APP-1685] (#347) * fix: content width on some pages (#348) * Release/v3.5.1 (#349) (#354) * Bump WP version * ♻️ Initial Refactor commit [APP-687] (#109) * Initial refactor commit * ✅ Added build and tests CI/CD * PR Rejects * Rejects leftover * Setup base (#110) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: settings variable * update: removed duplicate css import * Update modules/settings/assets/js/api/index.js --------- * [Infra] ✅ updated Github actions (#114) * updated github actions * removed composer github auth * PHPCS * removed package-lock.json from ignore to allow `npm ci` * added missing husky * ignore legacy * removed unused non existing import * Add connect modal (#111) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * fix: alignment and style * update: imports * update: removed conflicting imports * fix: add compatibility for mobile devices --------- * [APP 705] add connect module, settings and notification component (#112) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports --------- * [APP 707] general setting components (#113) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * Update modules/settings/assets/js/components/color-picker/style.css * update: color picker class name --------- * [App 780] Navigation Sidebar (#115) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * update: added translations * fix: admin top bar layout * update: exports of icons * update: exports of components * add: aliases for imports and fix exports * fix: height and styling of the layout * fix: unhide wp footer * update: keep widget menu open on page load (default) * update: linter rules to move first prop to new line * update: linter rules to move first prop to new line --------- * Fix error on install plugin, add prettier (#116) * Feature/app 810 assemble icon settings page (#117) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * Update modules/settings/assets/js/components/color-picker/style.css * update: color picker class name * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * add: props to wrapper * add: icon design and position setting layouts * add: in page scroll behaviour to the settings * add: widget icons and getter function * update: icon design settings getter and setter functions * update: imports * add: mobile layout for position settings * add: icon position settings * add: icon position settings hooks and handlers * fix: alignment of controls in AlignmentMatrixControl * update: useSettings and usePositionSetting hooks and relevant functions * fix: colors of AlignmentMatrixControl * fix: styling of components and layouts * add: aliases * add: container wrapper to page * update: accessibility options rendering logic * fix: order of the icons * add: aliases for components and hooks imports * fix: styling of settings panel * fix: container height for settings page * update: toggle control states * add: widget icon settings * add: load saved widget icon settings * update: move layout to page for different designs per page * update: add changes tracking and disable button logic * add: async/await to save settings * update: convert options to array of objects * Update modules/settings/assets/js/components/bottom-bar/index.js * Update modules/settings/assets/js/app.js * fix: remove duplicate entries --------- * Feature/app 708 widget menu settings (#118) * add: icons for menu settings * add: placeholder layout for widget preview in menu settings * update: load saved settings and updated imports * add: logics for handling and saving menu settings * add: useSavedSettings hook * update: set export as default for Sidebar layout * add: widget menu settings layout and settings * update: add widget menu settings and widget preview layouts * add: hide/show minimum option alert notification * update: styling of the save button * update: save settings logic to use async/await * fix: accessibility text icon * update: app type (#119) * [APP-834] Update account menu buttons (#121) * update: account menu buttons * update: billing link * add: error handling for switch account * [APP-835] add service data (#122) * add: client functions * add: site register and site info endpoints * update: add plan data settings * update: add support for 201 response code * update: add plan data key * update: store the plan data on the once the site is registered * update: add filter for client url * add: retry registering in there is any error after connect * update: setting prefix * add: plan data * update: add account details to menu * fix: lint issues * update: add data checkbox support (#123) * [APP-928] Settings pointer (#125) * add: settings pointer * update: add alias for the settings * [APP-837] Add post connect modal (#120) * add: post connect modal * update: settings prefix * fix: connect modal design * update: connect modal text * add: connect modal graphics * update: connect modal icon * update: post connect modal * update: sidebar menu text * update: text of icon settings * update: text * update: php compatibility with return types * add: accessibility statement page structure (#126) * [APP-721] Render widget and global settings (#124) * add: webhook endpoint * add: widget module * add: default widget settings on successful registration * update: name of global object to ea11yWidget * update: remove json encoding to make objects available on the frontend * update: widget url, filter and enqueuing method * update: removed obsolete code * update: enqueue script only when connected * update: add check for valid plan data and key * update: conditional check * update: conditional check * fix: widget loading error (#128) * [Legacy] Upgrade To New [APP-949] (#127) * Added `Notice_Base` and `Notices` component to core module * Always load core module and load all other modules based on legacy status * added filter in customizer settings * added bubble / pimple in admin menu to indicate upgrade * added `Dismissible_Deprecated_Nag` notice to none legacy pages * added `Dismissible_Deprecated_Nag` notice to legacy pages * Added `Upgrade` component to legacy module includes: * loading of notices * introduction modal * admin menu pimple * customizer notice * pointer * confirmation modal * upgrade logic and handler * ✅ Fixed legacy module test * added `local:quick-run` command to run in browser mode * update phpunit workflow * ensure wp.ajax is loaded * wrong translations * Updated strings * added "Equally" * remove unused test * ✅ use custom version of wp test library (#129) * ✅ use custom version of wp test library * cleanup * update WP versions for testing * [APP-711] Widget preview (#130) * add: dynamic script loader for widget * update: settings name * update: settings save function and comments * update: tools settings object structure * add: widget preview section * update: added setting page slug as a constant * update: enqueue widget for preview in the settings * add: widget icon assets link * add: widget icon svgs * update: store widget url in a constant * update: store widget url in a constant * update: trigger widget preview update on menu item changes * update: remove the icon option from the frontend. * update: add widget URL * update: plan data setting type * update: widget plan url * update: widget plan url and parse plan data * fix: phpcs error ext-json missing * fix: widget url * fix: save and use plan data as a serialized option * fix: use template string for widget url * [APP-908] Accessibility generator (#131) * add: accessibility statement radio icons * update: add form group on radio buttons * add: statement generator * add: statement generator * add: accessibility statement data option * update: create page in WordPress and save it to the option * update: exclude zip file from the git * update: render statement page conditionally * add: statement link layout and settings * add: preload statement data * update: publish the created page and add link for it * update: changed Dynamic Script Loader to WidgetLoader * add: accessibility statement url * update: text and styling * update: styling of the preview text * update: restructure statement generator * add: support for dynamic update in statement links * update: remove index.css file for widget loader * add: widget styling for settings page * add: empty link when hide link is enabled * update: statement page structure and logic * fix: typo * update: convert component into a styled component * fix: styling and layout * update: icons * update: convert radio buttons to styled component * fix: typo and style * add: fading for the link preview * update: import * update: styling and spacing * fix: sidebar layout * update: wpcs to latest version * fix: spacing * fix: wpcs version * add: check for valid statement page * fix: jitters on rendering * fix: use escape attribute * update: settings menu slug and plugin name * fix: menu item rendering * update: definition of the styled text field * add: addPage function to the API * fix: add notification on page creation * add: copy link icon * update: optimize SVGs * [APP-908] Additional fixes (#133) * fix: text domains * updated: styled component syntax * update: use await instead of then * fix: prevent application crash in case widget fails to load * add: generated info tip card * update: refactor function * Fix: Fix the QA bugs [n/a] (#135) * [APP-830] Add mixpanel events (#134) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel (#136) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] rename events (#137) * Connect and Preview Fixes (#139) * updated connect admin page * Use unified widget URL instead of hardcoded Js to support envs * Removed enqueue of fictional widget.js and reuse settings `admin` handle * Fix: Fix the QA bugs [n/a] (#138) * New: Finish the BE integration [n/a] * Fix: Fix some bugs [n/a] * upgrade flow UI and design tweaks [app-949] (#141) * Updated Learn More links with UTM's * Tweaked Pointer strings Icon and CTA * dismissible notice strings * sticky notice strings * updated upgrade flow design for pointer, notices, introduction modal, and confirmation modal * added build script * [APP-979] Update links and plugin name (#140) * Ensure loading of legacy widget based on any saved data and fixed legacy JS * Bug/app 1002 (#143) * Bug: Update the logo in the "Hide Widget" modal [APP-1001] * Fix: Update the side menu spaces [APP-1002] * [APP-991] Add translation for statement (#142) * [APP-979] Update links and plugin name * [APP-991] Add translation for statement * Set Prod Widget URL * [APP-1004][APP-1005][APP-1006] Fix generator UI and logic, fix statement UI, fix copy link (#144) * [APP-1004] Fix generator UI and logic * [APP-1005] Fix statement UI * [APP-1005] Fix statement UI * Mixpanel record session * Fix: Enhance position values validation [APP-1009] (#146) * Bug/app 1003 (#147) * Fix: Add a border to the preview [n/a] * Fix: Fix Capabilities screen UI [APP-1003] * [APP-1020] add missed events (#148) * [APP-1015] fix switch account (#149) * [APP-1015] fix switch account (#150) * [APP-1021] Fix switch modal ui (#151) * fix: ui issues * fix: translation strings * [APP-912] add default settings for RTL (#152) * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-1026] Remove HTML breaking <style> tag & update pointer logic (#153) * fix: remove extra closing tag * update: hide settings pointer when plugin settings is opened * update: remove unused functions * update: add help text to mobile position settings * Bug/app 1003 (#157) * Fix: Add missed translations [n/a] * Fix: Refresh the plan data on page load [n/a] * New: Add loader to the settings [n/a] * update: delete lock key after each check (#160) * New: Update dashboard icon size [n/a] (#158) * New: Update dashboard icon size [n/a] * Fix: Fix widget previews [n/a] * [APP-1018] Help menu change (#155) * update: remove accessibility word from menu items * update: remove top bar * update: add help button to the sidebar * update: re-add spacing in styled css code * update: create styled components * [APP-973] Add an UTM for users upgrading from one click to the new widget (#165) * update: ui of the statement preview (#166) * [APP-1011][APP-1013] focus outline and sitemap settings (#161) * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * update: video link (#167) * [APP-1051] Fix layout on the small and medium devices (#156) * fix: layout on the small and medium devices * update: change components to styled components * refactor: position settings wrapper into a separate component * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel (#169) * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1048] Add tooltip to accessibility statement (#159) * add: tooltip to accessibility statement * update: hide infotip when statement link is set * update: infotip's text * fix: infotip naming and logic * [APP-1049] Add back button accessibility statement (#164) * add: back button to the statement link section * add: Edit link button to statement page section * update: add admin_url and generate query args properly * update: learn more link for accessibility statement page (#168) * Fix: Update overlay height [n/a] (#171) * Fix settings and connect issues (#170) * fix: token fails to refresh after expiry * update: add 12 hour time for plan data refresh and fix missing subscription id * update: add check to refresh plan data * fix: decoding errors and alignment and add logging for errors * update: refresh logic and formatting * Update/app 1029 app name (#173) * update: plugin name * update: default menu option * update: menu structure * update: add inline checks * update: reduce padding on app icon in menu * fix: height of the modal * update: app menu icon color * update: menu icon colors * fix: menu icon size * update: plugin names * update: HELP_LINK * update: app name * update: icon background color * update: icon size * fix: admin icon size * fix: width of the sidebar * Fix/toggle not working properly (#174) * fix: toggles not working properly in some cases * fix: saving of the settings was not working * add: missing adminUrl in settings data * fix: switch was not working properly in some cases (#175) * Fix/app 1093 incorrect position on default (#176) * fix: switch was not working properly in some cases * fix: default setting structure for the icon position * [APP-1096] Text changes (#177) * fix: switch was not working properly in some cases * update: plugin name and action buttons title * fix: revert change to is_active function * fix: button color * New: Add the skip link [APP-1012] (#179) * [APP-1097] Fix preview load (#178) * [APP-1097] Fix preview load * [APP-1097] Fix preview load * [APP-1097] Fix preview load * Update modules/settings/assets/js/components/widget-loader/index.js --------- * [APP-1123] Accessibility statement text (#181) * fix: switch was not working properly in some cases * update: accessibility statement content * [APP-1121] Add support for react-jsx-runtime for older WP versions (#180) * fix: switch was not working properly in some cases * update: revert wp-scripts version to 28.0.0 to add support for older WordPress versions * update: revert wp-scripts to 27.9.0 * add: support for react-jsx-runtime in older versions of WordPress * update: version to the latest wp-scripts 30.3.0 * update: add lib/ to gitignore * update: plugin name * Fix: Fix admin widget previews [n/a] (#183) * [APP-1061] change mixpanel user id (#184) * [APP-1129] change toggle_event for mixpanel (#186) * Remove skip to content btn if anchor does not exist (#187) * fix: hide wp notices to keep the layout from shifting (#189) * [APP-1143] fix bug with capability display (#195) * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * add: loading text to widget preview (#196) * [APP-1142] add 'appType' super props, change identify key (#191) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1142] Add 'appType' super props * [APP-1144] Accessibility statement tooltip text update (#198) * update: text * update: switch design * Tweak: Update widget loaders [n/a] (#197) * added images to readme (#172) * added images to readme * updated readme * V3.0.0 * updated readme * updated tested up to * Fix: Update the skip link rendering hook [APP-1157] (#203) * bumped v3.0.1 (#206) * Fix: Adapt widget preview to smaller height viewports [APP-1130] (#217) * update: convert menu icon to base64 svg (#199) * update: convert menu icon to base64 svg * update: logo to svg logo with base64 encoded * update: svg app icon * [APP-1201] Improve admin panel accessibility (#220) * [APP-1201] add accessibility rules * [APP-1201] add accessibility rules * [APP-1210] add prop to Mixpanel, move event names to const (#225) * [APP-1159] Add mismatch URL flow (#210) * update: convert imports to named imports * add: function to check if current screen is settings page * update: rename elementor logo to app logo * add: url mismatch flow and components * update: remove obsolete code * Update modules/connect/rest/authorize.php * Update modules/settings/module.php * fix: modal was not closing * update: remove url mismatch notice * update: mismatch modal and rendering logic * add: toast notifications for errors * update: convert components into styled components * update: remove bottom border from the dialog * update: text copy * fix: logo alignment * update: renamed styled component --------- * [APP-1108][APP-1109][APP-1110] Add analytics backend logic (#190) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1101] Move action button to footer (#208) * update: add save changes footer to the bottom and remove it from capabilities * add: logic to save settings for skiptocontent using footer * update: text * update: convert component to styled component * [APP-1198] [APP-1199] Quota bar and notices (#219) * add: quota bar * add: openLink helper function * add: styled elements and visits link placeholder * update: remove hover state from the box * add: quota notices * update: quota access and usage calculations * add: logic to calculate plan usage * update: move logic to calculate plan usage to hook * add: todo note * add: todos * add: mixpanel events * fix: hide quota bar when sidebar is minimized * fix: settings panel was not expanding when sidebar is minimized * update: text and structure of the bar * update: quota calculation logic * update: remove TODOs * update: text and values * fix: height of the container for icon settings * update: golinks * update: golinks * fix: prevent icon options from wrapping on smaller screen sizes (#229) * [APP-1107] Add dashboard for analytics (#204) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1201] add accessibility rules * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] add check for is_active * update to the latest * update to the latest * update to the latest * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * [APP-1105] Add pro capabilities (#205) * add: volume and solid crown icon * add: volume and crown icons to export * update: refactor menu item to a new component * add: screen reader to the menu items and reorganize them * add: pro item infotip content * add: capabilities item and pro info tip to exports * update: import ProInfoTip component and change disabled logic * update: imports * update: refactor pro item infotip into the separate component * update: refactor infotip and add comments * add: custom switch component * add: logo settings layout * update: switch component * add: useToggleSetting hook to manage widget settings. * update: move pro feature key to a separate constant * fix: pro icon style * update: remove branding key * update: pro enable check structure * update: pro enabled check structure * update: key name * update: update key before checking for it * fix: null error * add: update logic to get the tools settings based on plan * update: exclude remove-elementor-label from the minimum option rule * update: add formlabel and eventnames * add: logic to deactivate the features which are disabled for the plan * fix: PHP warning * fix: keyword name * add: GOLINKS * add: open link function * fix: PHP warning undefined key * update: logic to show the icon and added golinks * [APP-1045] Add billing tab (#223) * add: plan name and subscription link * update: refactor my account menu * update: move truncate email to a helper file * update: simplify truncation logic * [APP-1270] Delete transient and force info update (#236) * add: force update site/info on mismatch url * update: add a constant for the transient * add: delete_transient for switch account as well * add: delete_transient for disconnect as well * [APP-1267] Quota bar undefined (#234) * fix: undefined was shown when there is no quota data * add: preloader * fix: make bottom bar sticky on the settings pages (#237) * [APP-1268] Pro tip spacing (#235) * fix: pro tip spacing * fix: pro icon * [APP-1271] Align menu icons (#238) * update: hide info button on minimized sidebar * fix: alignment of quota bar icon * fix: conditional logic * update: improve sidebar motion * fix: switch account issue * update: upgrade link for analytics popup (#239) * [APP-1281] fix usage percentage formatting (#240) * fix: format display of percentage correctly. * update: fraction conversion logic * Force referer and lower transient time to 15 minutes [APP-1286] (#242) * reduce transient timeout * force referrer in script tags * [APP-1262] Enable routes for get statistic on disabled analytics (#233) * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1243] Admin upgrade notices (#241) * add: admin quota notices * add: fix function name and phpcs issues * fix: formatting issues * [APP-1287] change Mixpanel check for free trial (#243) * Fix/quota text (#244) * fix: wp notice close logic plus banner text * update: banner text * [APP-1292] missing mixpanel events (#245) * add: missing mixpanel events * update: use variable for hardcoded names * update: use variable for hardcoded names * [APP-1293] Add additional checks (#246) * update: add additional check to prevent fatal error * fix: formatting * [APP-1312] minimize client css (#252) * [APP-1168] widget icon radius * add: icon radius component * add: icon radius component * update: add support for widget radius * fix: minor ui fixes * fix: resolve comments * fix: alignment of the icon * update: add styled components * add: corner radius mixpanel event * fix: corner radius should have default values when no value is set based on icon * fix: icon radius input style * add: accessibility attributes * fix: active states color * add: logic to control invalid inputs * update: make aria attributes translatable * update: styled component names * add: spacing between the components * [APP-1342] add super props, store plan scope after register/switch (#250) * [APP-0000] store plan scope after register/switch * Update modules/settings/module.php * remove deprecated method * remove deprecated method * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel --------- * [Legacy] Added strict settings sanitization (#257) * [Legacy] Added strict settings sanitization * use correct esc_x method * hardcoded 6.8.0 * added svn for wp test library * fix: default border radius (#258) * fix: default border radius * add: default corner radius for new users * update: add support for default values for users with saved style settings * updated phpunit workflow * revert to master * hardcode 6.8.x * update: default values for existing users * update: remove saving default corner radius for new users * fix: update default radius for text icon * fix: PHPUnit tests for WP 6.8.0 * align with develop * set to latest --------- * fix: widget icon spacing (#262) * Added custom gutenberg link to toggle widget [APP-1306] (#256) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] (#254) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] * typo Update modules/widget/components/ally-trigger.php * New: Add the what's new functionality [APP-1329] (#264) * add: statement page selector field (#261) * add: statement page selector field * add: updated the statement link button to a search field * fix: add support for create statement data * New: Bump the Notifications SDK to 1.2.0 [APP-1427] (#267) * Fix: Resolve a11y issues [APP-1331] (#269) * [APP-1417] Add support for custom icon (#270) * add: media upload button * add: support for custom icon * fix: code alignment, phpcs * fix: code alignment and linting * add: mixpanel events * fix: styling of custom svg * fix: missing variable * fix: missing variable * fix: load gutenberg block without css * fix: icon spacing in preview * fix: indentation * fix: indents * [APP-1440] Fix doing_it_wrong warning for translations (#271) * fix: doing_it_wrong warning for translations * update: stop explicitly loading translations * fix: add package-lock * fix: add package-lock * New: Store fonts inside the plugin [APP-1385] (#277) * add: what's new mixpanel event (#274) * fix:disable autofocus on opening of popup menu (#279) * New: Add the birthday banner [APP-1489] (#281) * [APP-1442] Add language selector option to plugin (#273) * add: language selector option * update: language selector option key * update: lang selector name (#284) * update: add language selector to analytics table (#285) * Tweak: Update the campaign's time range [APP-1489] (#283) * fix: container width logic (#292) * [APP-1530] scrollbars settings width (#296) * update: title layout * fix: width of the content * update: browserlist * fix: rtl issues (#304) * [APP-1629] Fix pro icon (#305) * update: @elementor/ui package * fix: pro icon * fix: pro icon * [APP-1678] Remove mixpanel session replay (#317) * Fix: plugin headers (#316) (#320) * [APP-907] Accessibility assistant (#326) * PHPCS and remediation POC WIP * WIP Wizard module * Added scanner module * [APP-929][APP-930] Add initial setup for wizard, added btn to the topbar (#230) * [APP-929][APP-930] * [APP-929][APP-930] * update logic * update init app * [APP-0000] store plan scope after register/switch * change return of load * add header * Move into shadow dom, add context, add headers components * add UI components * add UI components * add UI components * merge current develop * merge current develop * Add AltText Form * Add scroll to current element * Align with current design, add loader, added preview for svg * Align with current design, add loader, added preview for svg * Resolve comments * Resolve comments * Resolve comments * [APP-934] add submit logic (#259) * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * Added replace remediation action * Add submit logic * Add submit alt text logic, generate AI alt text * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation --------- * Add texts, add remediation submit, fix logic to store remediation * [APP-0000] add store request to the Service API (#268) * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-1432] fix with AI flow (#275) * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1446] sidebar menu update (#276) * update: simplify menu * add: headings and scanner menu options * [APP-945] add column for tables (#282) * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-1447] Updated quota bar designs (#278) * update: quota bar designs * fix: the popover was partially visible * update: AI credits name * update: usage calculation logic * add: quota indicators * update: quotas tooltip text * update: quotas notices text * update: make toggle icon dynamic * fix: @elementor/ui imports * Update modules/settings/assets/js/layouts/quota-bar.js * update: styling of component --------- * [APP-1507] add UI changes (#286) * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1387] add mixpanel events (#288) * [APP-1387] add mixpanel events * [APP-1387] add mixpanel events * New: Add the a11y assistant dashboard's UI [APP-1445] (#289) * [APP-1513] add disconnected msg (#290) * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues (#291) * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * fix: infotip icon padding and font style (#293) * fix: infotip icon padding and font style * fix: infotip icon padding and font style * update: caniuse database * [APP-1525] add edit mode (#294) * [APP-1525] add edit mode * [APP-1525] add edit mode * [APP-1525] add edit mode * Bug/app 1544 (#295) * Fix: Resolve QA comments [APP-1544] * New: Add beta tags [APP-1555] * New: Add the "no results" state [APP-1544] * [APP-1554] rename violations (#297) * [APP-1512] add backend logic for remediation management (#298) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php * Update modules/remediation/rest/items.php * [APP-1512] add backend logic for remediation management --------- * Fix: Resolve QA comments [n/a] (#299) * [APP-1512] add FE remediation management (#300) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php * Update modules/remediation/rest/items.php * [APP-1512] add backend logic for remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management --------- * [APP-1609] fix tooltip * [APP-1609] fix resolved btn click * [APP-1401] clear cache on update (#302) * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * update with latest develop branch * fix copies * [APP-1619] add mixpanel event (#303) * [APP-1619] add mixpanel event * [APP-1619] add mixpanel event * [APP-1593] Add locked variant for quota bar (#301) * update: add locked version of quota status bar * fix: text color for infotip * fix: width issues * fix: add check for 0 * [APP-1637][APP-1643] add UI fixes, add excluded rules array (#307) * fix: make sidebar collapsible (#306) * Merge current dev * [APP-1603] Add dashboard menu (#309) * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * Bug/app 1607 (#311) * Fix: Update stats calculation logic [APP-1607] * Fix: Set fixed width for the results table [APP-1650] * Fix: Update filter rules [APP-1634] * New: Add the no search results state [APP-1651] * Fix: Convert indents [n/a] * [APP-1670] add menu on Manage Fixes (#315) * [APP-1670] add menu on Manage Fixes * [APP-1670] update menu * [APP-1611] fix comments * fix: direction of snippet (#313) * [APP-1561] New menu layout (#308) * update: app menu and layout * merge: latest changes from feature/remediation * add: alert indicator to the closed sidebar * fix: page layout for statement page * update: menu display names * fix: topbar menu layout * update: sidebar menu width * update: sidebar menu width * fix: popup menu layout * add: hover action to the toggle button * update: my account menu * fix: quota indicator for closed sidebar * fix: icon alignments * fix: scroll behaviour * fix: page scroll behaviour * fix: popup menu hover state * update: quota bar and group layouts * add: tooltips to the menu items * update: make scans page fixed height and scrollable * update: styles with theme references and added new styled components * fix: make sidebar smoother * update: accessibility page heading * Merge latest develop * [APP-1611] trigger save entry for clean cache (#314) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async (#319) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * fix: scrollbar issues (#318) * [APP-1615] add remediation for wp image (#321) * POC - FrontEnd remediations to handle Dynamic Data [APP-1644] (#312) * POC - FrontEnd remediations to handle Dynamic Data * Update modules/remediation/components/remediation-runner.php * added MutationObserver to cover elements that are added later on the page runs until remediations are all done, and disconnect * added $use_frontend flag instead of using "false" * Update modules/remediation/components/remediation-runner.php * WIP on poc/fe-remediations * [APP-0000] call trigger save async * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Small fixes * Small fixes * Small fixes * Small fixes --------- * [APP-1611] Fix cache issue (#324) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * [APP-1611] clear cache * [APP-1657] upgrade cta (#323) * update: added logic to show button based on plan * Update modules/settings/assets/js/components/quota-bar/quota-bar-group.js * fix: eslint error --------- * [APP-1658] Update accessibility admin column design (#322) * update: wpadmin column layout * update: move icon to assets * Fix: Resolve remediation encoding issue [APP-1646] (#325) --------- * [APP-1698] Update referrer policy (#333) * [APP-1697] fix menu, add category to events as key without translation (#334) * [APP-1697] fix menu, add category to events as key without translation * [APP-1697] fix menu, add category to events as key without translation * [APP-1717] Fix category title (#335) * [APP-1724] Fix get object type for singular (#338) * [APP-1724] Fix get object type for singular * [APP-1724] Fix get object type for singular * Update modules/remediation/classes/utils.php --------- * Fix: Resolve some a11y issues [APP-1664] (#337) * [APP-1696] Fix help menu ui (#339) * fix: menu ui * update: onclick action * fix: alignment of the menu * update: rename menu item to accessibility assistant * Fix: Use the same issue count in the WP admin and scanner [APP-1726] (#341) * Fix: Move data tag logic away from the component to prevent multiple renders [APP-1502] (#342) * [APP-1738] add case-insensitive replace (#345) * [APP-1738] add case-insensitive replace * Update modules/remediation/assets/js/actions/replace.js * Update modules/remediation/assets/js/actions/replace.js * [APP-1741][APP-1742][APP-1743] add components, calc contrast ratio, add logic for lightness * Update modules/remediation/assets/js/actions/replace.js * update * update * update --------- * bumped v3.5.1 * [APP-1776] Deactivate scanner on not connected (#350) --------- Co-authored-by: Yakir Sitbon <kingyes1@gmail.com> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: VasylD <vasyld@elementor.red> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Sync 3.5.2 to the dev (#358) * Release/v3.5.1 (#349) * Bump WP version * ♻️ Initial Refactor commit [APP-687] (#109) * Initial refactor commit * ✅ Added build and tests CI/CD * PR Rejects * Rejects leftover * Setup base (#110) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: settings variable * update: removed duplicate css import * Update modules/settings/assets/js/api/index.js Co-authored-by: VasylD <vasyld@elementor.red> --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: VasylD <vasyld@elementor.red> * [Infra] ✅ updated Github actions (#114) * updated github actions * removed composer github auth * PHPCS * removed package-lock.json from ignore to allow `npm ci` * added missing husky * ignore legacy * removed unused non existing import * Add connect modal (#111) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * fix: alignment and style * update: imports * update: removed conflicting imports * fix: add compatibility for mobile devices --------- Co-authored-by: Ohad <ohad@elementor.com> * [APP 705] add connect module, settings and notification component (#112) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports --------- Co-authored-by: Ohad <ohad@elementor.com> * [APP 707] general setting components (#113) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * Update modules/settings/assets/js/components/color-picker/style.css Co-authored-by: Raz Ohad <admin@bainternet.info> * update: color picker class name --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> * [App 780] Navigation Sidebar (#115) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * update: added translations * fix: admin top bar layout * update: exports of icons * update: exports of components * add: aliases for imports and fix exports * fix: height and styling of the layout * fix: unhide wp footer * update: keep widget menu open on page load (default) * update: linter rules to move first prop to new line * update: linter rules to move first prop to new line --------- Co-authored-by: Ohad <ohad@elementor.com> * Fix error on install plugin, add prettier (#116) * Feature/app 810 assemble icon settings page (#117) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * Update modules/settings/assets/js/components/color-picker/style.css Co-authored-by: Raz Ohad <admin@bainternet.info> * update: color picker class name * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * add: props to wrapper * add: icon design and position setting layouts * add: in page scroll behaviour to the settings * add: widget icons and getter function * update: icon design settings getter and setter functions * update: imports * add: mobile layout for position settings * add: icon position settings * add: icon position settings hooks and handlers * fix: alignment of controls in AlignmentMatrixControl * update: useSettings and usePositionSetting hooks and relevant functions * fix: colors of AlignmentMatrixControl * fix: styling of components and layouts * add: aliases * add: container wrapper to page * update: accessibility options rendering logic * fix: order of the icons * add: aliases for components and hooks imports * fix: styling of settings panel * fix: container height for settings page * update: toggle control states * add: widget icon settings * add: load saved widget icon settings * update: move layout to page for different designs per page * update: add changes tracking and disable button logic * add: async/await to save settings * update: convert options to array of objects * Update modules/settings/assets/js/components/bottom-bar/index.js Co-authored-by: VasylD <vasyld@elementor.red> * Update modules/settings/assets/js/app.js Co-authored-by: VasylD <vasyld@elementor.red> * fix: remove duplicate entries --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: VasylD <vasyld@elementor.red> * Feature/app 708 widget menu settings (#118) * add: icons for menu settings * add: placeholder layout for widget preview in menu settings * update: load saved settings and updated imports * add: logics for handling and saving menu settings * add: useSavedSettings hook * update: set export as default for Sidebar layout * add: widget menu settings layout and settings * update: add widget menu settings and widget preview layouts * add: hide/show minimum option alert notification * update: styling of the save button * update: save settings logic to use async/await * fix: accessibility text icon * update: app type (#119) * [APP-834] Update account menu buttons (#121) * update: account menu buttons * update: billing link * add: error handling for switch account * [APP-835] add service data (#122) * add: client functions * add: site register and site info endpoints * update: add plan data settings * update: add support for 201 response code * update: add plan data key * update: store the plan data on the once the site is registered * update: add filter for client url * add: retry registering in there is any error after connect * update: setting prefix * add: plan data * update: add account details to menu * fix: lint issues * update: add data checkbox support (#123) * [APP-928] Settings pointer (#125) * add: settings pointer * update: add alias for the settings * [APP-837] Add post connect modal (#120) * add: post connect modal * update: settings prefix * fix: connect modal design * update: connect modal text * add: connect modal graphics * update: connect modal icon * update: post connect modal * update: sidebar menu text * update: text of icon settings * update: text * update: php compatibility with return types * add: accessibility statement page structure (#126) * [APP-721] Render widget and global settings (#124) * add: webhook endpoint * add: widget module * add: default widget settings on successful registration * update: name of global object to ea11yWidget * update: remove json encoding to make objects available on the frontend * update: widget url, filter and enqueuing method * update: removed obsolete code * update: enqueue script only when connected * update: add check for valid plan data and key * update: conditional check * update: conditional check * fix: widget loading error (#128) * [Legacy] Upgrade To New [APP-949] (#127) * Added `Notice_Base` and `Notices` component to core module * Always load core module and load all other modules based on legacy status * added filter in customizer settings * added bubble / pimple in admin menu to indicate upgrade * added `Dismissible_Deprecated_Nag` notice to none legacy pages * added `Dismissible_Deprecated_Nag` notice to legacy pages * Added `Upgrade` component to legacy module includes: * loading of notices * introduction modal * admin menu pimple * customizer notice * pointer * confirmation modal * upgrade logic and handler * ✅ Fixed legacy module test * added `local:quick-run` command to run in browser mode * update phpunit workflow * ensure wp.ajax is loaded * wrong translations * Updated strings * added "Equally" * remove unused test * ✅ use custom version of wp test library (#129) * ✅ use custom version of wp test library * cleanup * update WP versions for testing * [APP-711] Widget preview (#130) * add: dynamic script loader for widget * update: settings name * update: settings save function and comments * update: tools settings object structure * add: widget preview section * update: added setting page slug as a constant * update: enqueue widget for preview in the settings * add: widget icon assets link * add: widget icon svgs * update: store widget url in a constant * update: store widget url in a constant * update: trigger widget preview update on menu item changes * update: remove the icon option from the frontend. * update: add widget URL * update: plan data setting type * update: widget plan url * update: widget plan url and parse plan data * fix: phpcs error ext-json missing * fix: widget url * fix: save and use plan data as a serialized option * fix: use template string for widget url * [APP-908] Accessibility generator (#131) * add: accessibility statement radio icons * update: add form group on radio buttons * add: statement generator * add: statement generator * add: accessibility statement data option * update: create page in WordPress and save it to the option * update: exclude zip file from the git * update: render statement page conditionally * add: statement link layout and settings * add: preload statement data * update: publish the created page and add link for it * update: changed Dynamic Script Loader to WidgetLoader * add: accessibility statement url * update: text and styling * update: styling of the preview text * update: restructure statement generator * add: support for dynamic update in statement links * update: remove index.css file for widget loader * add: widget styling for settings page * add: empty link when hide link is enabled * update: statement page structure and logic * fix: typo * update: convert component into a styled component * fix: styling and layout * update: icons * update: convert radio buttons to styled component * fix: typo and style * add: fading for the link preview * update: import * update: styling and spacing * fix: sidebar layout * update: wpcs to latest version * fix: spacing * fix: wpcs version * add: check for valid statement page * fix: jitters on rendering * fix: use escape attribute * update: settings menu slug and plugin name * fix: menu item rendering * update: definition of the styled text field * add: addPage function to the API * fix: add notification on page creation * add: copy link icon * update: optimize SVGs * [APP-908] Additional fixes (#133) * fix: text domains * updated: styled component syntax * update: use await instead of then * fix: prevent application crash in case widget fails to load * add: generated info tip card * update: refactor function * Fix: Fix the QA bugs [n/a] (#135) * [APP-830] Add mixpanel events (#134) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel (#136) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] rename events (#137) * Connect and Preview Fixes (#139) * updated connect admin page * Use unified widget URL instead of hardcoded Js to support envs * Removed enqueue of fictional widget.js and reuse settings `admin` handle * Fix: Fix the QA bugs [n/a] (#138) * New: Finish the BE integration [n/a] * Fix: Fix some bugs [n/a] * upgrade flow UI and design tweaks [app-949] (#141) * Updated Learn More links with UTM's * Tweaked Pointer strings Icon and CTA * dismissible notice strings * sticky notice strings * updated upgrade flow design for pointer, notices, introduction modal, and confirmation modal * added build script * [APP-979] Update links and plugin name (#140) * Ensure loading of legacy widget based on any saved data and fixed legacy JS * Bug/app 1002 (#143) * Bug: Update the logo in the "Hide Widget" modal [APP-1001] * Fix: Update the side menu spaces [APP-1002] * [APP-991] Add translation for statement (#142) * [APP-979] Update links and plugin name * [APP-991] Add translation for statement * Set Prod Widget URL * [APP-1004][APP-1005][APP-1006] Fix generator UI and logic, fix statement UI, fix copy link (#144) * [APP-1004] Fix generator UI and logic * [APP-1005] Fix statement UI * [APP-1005] Fix statement UI * Mixpanel record session * Fix: Enhance position values validation [APP-1009] (#146) * Bug/app 1003 (#147) * Fix: Add a border to the preview [n/a] * Fix: Fix Capabilities screen UI [APP-1003] * [APP-1020] add missed events (#148) * [APP-1015] fix switch account (#149) * [APP-1015] fix switch account (#150) * [APP-1021] Fix switch modal ui (#151) * fix: ui issues * fix: translation strings * [APP-912] add default settings for RTL (#152) * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-1026] Remove HTML breaking <style> tag & update pointer logic (#153) * fix: remove extra closing tag * update: hide settings pointer when plugin settings is opened * update: remove unused functions * update: add help text to mobile position settings * Bug/app 1003 (#157) * Fix: Add missed translations [n/a] * Fix: Refresh the plan data on page load [n/a] * New: Add loader to the settings [n/a] * update: delete lock key after each check (#160) * New: Update dashboard icon size [n/a] (#158) * New: Update dashboard icon size [n/a] * Fix: Fix widget previews [n/a] * [APP-1018] Help menu change (#155) * update: remove accessibility word from menu items * update: remove top bar * update: add help button to the sidebar * update: re-add spacing in styled css code * update: create styled components * [APP-973] Add an UTM for users upgrading from one click to the new widget (#165) * update: ui of the statement preview (#166) * [APP-1011][APP-1013] focus outline and sitemap settings (#161) * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * update: video link (#167) * [APP-1051] Fix layout on the small and medium devices (#156) * fix: layout on the small and medium devices * update: change components to styled components * refactor: position settings wrapper into a separate component * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel (#169) * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1048] Add tooltip to accessibility statement (#159) * add: tooltip to accessibility statement * update: hide infotip when statement link is set * update: infotip's text * fix: infotip naming and logic * [APP-1049] Add back button accessibility statement (#164) * add: back button to the statement link section * add: Edit link button to statement page section * update: add admin_url and generate query args properly * update: learn more link for accessibility statement page (#168) * Fix: Update overlay height [n/a] (#171) * Fix settings and connect issues (#170) * fix: token fails to refresh after expiry * update: add 12 hour time for plan data refresh and fix missing subscription id * update: add check to refresh plan data * fix: decoding errors and alignment and add logging for errors * update: refresh logic and formatting * Update/app 1029 app name (#173) * update: plugin name * update: default menu option * update: menu structure * update: add inline checks * update: reduce padding on app icon in menu * fix: height of the modal * update: app menu icon color * update: menu icon colors * fix: menu icon size * update: plugin names * update: HELP_LINK * update: app name * update: icon background color * update: icon size * fix: admin icon size * fix: width of the sidebar * Fix/toggle not working properly (#174) * fix: toggles not working properly in some cases * fix: saving of the settings was not working * add: missing adminUrl in settings data * fix: switch was not working properly in some cases (#175) * Fix/app 1093 incorrect position on default (#176) * fix: switch was not working properly in some cases * fix: default setting structure for the icon position * [APP-1096] Text changes (#177) * fix: switch was not working properly in some cases * update: plugin name and action buttons title * fix: revert change to is_active function * fix: button color * New: Add the skip link [APP-1012] (#179) * [APP-1097] Fix preview load (#178) * [APP-1097] Fix preview load * [APP-1097] Fix preview load * [APP-1097] Fix preview load * Update modules/settings/assets/js/components/widget-loader/index.js --------- Co-authored-by: Raz Ohad <ohad@elementor.com> * [APP-1123] Accessibility statement text (#181) * fix: switch was not working properly in some cases * update: accessibility statement content * [APP-1121] Add support for react-jsx-runtime for older WP versions (#180) * fix: switch was not working properly in some cases * update: revert wp-scripts version to 28.0.0 to add support for older WordPress versions * update: revert wp-scripts to 27.9.0 * add: support for react-jsx-runtime in older versions of WordPress * update: version to the latest wp-scripts 30.3.0 * update: add lib/ to gitignore * update: plugin name * Fix: Fix admin widget previews [n/a] (#183) * [APP-1061] change mixpanel user id (#184) * [APP-1129] change toggle_event for mixpanel (#186) * Remove skip to content btn if anchor does not exist (#187) * fix: hide wp notices to keep the layout from shifting (#189) * [APP-1143] fix bug with capability display (#195) * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * add: loading text to widget preview (#196) * [APP-1142] add 'appType' super props, change identify key (#191) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1142] Add 'appType' super props * [APP-1144] Accessibility statement tooltip text update (#198) * update: text * update: switch design * Tweak: Update widget loaders [n/a] (#197) * added images to readme (#172) * added images to readme * updated readme * V3.0.0 * updated readme * updated tested up to * Fix: Update the skip link rendering hook [APP-1157] (#203) * bumped v3.0.1 (#206) * Fix: Adapt widget preview to smaller height viewports [APP-1130] (#217) * update: convert menu icon to base64 svg (#199) * update: convert menu icon to base64 svg * update: logo to svg logo with base64 encoded * update: svg app icon * [APP-1201] Improve admin panel accessibility (#220) * [APP-1201] add accessibility rules * [APP-1201] add accessibility rules * [APP-1210] add prop to Mixpanel, move event names to const (#225) * [APP-1159] Add mismatch URL flow (#210) * update: convert imports to named imports * add: function to check if current screen is settings page * update: rename elementor logo to app logo * add: url mismatch flow and components * update: remove obsolete code * Update modules/connect/rest/authorize.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * Update modules/settings/module.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * fix: modal was not closing * update: remove url mismatch notice * update: mismatch modal and rendering logic * add: toast notifications for errors * update: convert components into styled components * update: remove bottom border from the dialog * update: text copy * fix: logo alignment * update: renamed styled component --------- Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * [APP-1108][APP-1109][APP-1110] Add analytics backend logic (#190) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1101] Move action button to footer (#208) * update: add save changes footer to the bottom and remove it from capabilities * add: logic to save settings for skiptocontent using footer * update: text * update: convert component to styled component * [APP-1198] [APP-1199] Quota bar and notices (#219) * add: quota bar * add: openLink helper function * add: styled elements and visits link placeholder * update: remove hover state from the box * add: quota notices * update: quota access and usage calculations * add: logic to calculate plan usage * update: move logic to calculate plan usage to hook * add: todo note * add: todos * add: mixpanel events * fix: hide quota bar when sidebar is minimized * fix: settings panel was not expanding when sidebar is minimized * update: text and structure of the bar * update: quota calculation logic * update: remove TODOs * update: text and values * fix: height of the container for icon settings * update: golinks * update: golinks * fix: prevent icon options from wrapping on smaller screen sizes (#229) * [APP-1107] Add dashboard for analytics (#204) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1201] add accessibility rules * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] add check for is_active * update to the latest * update to the latest * update to the latest * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * [APP-1105] Add pro capabilities (#205) * add: volume and solid crown icon * add: volume and crown icons to export * update: refactor menu item to a new component * add: screen reader to the menu items and reorganize them * add: pro item infotip content * add: capabilities item and pro info tip to exports * update: import ProInfoTip component and change disabled logic * update: imports * update: refactor pro item infotip into the separate component * update: refactor infotip and add comments * add: custom switch component * add: logo settings layout * update: switch component * add: useToggleSetting hook to manage widget settings. * update: move pro feature key to a separate constant * fix: pro icon style * update: remove branding key * update: pro enable check structure * update: pro enabled check structure * update: key name * update: update key before checking for it * fix: null error * add: update logic to get the tools settings based on plan * update: exclude remove-elementor-label from the minimum option rule * update: add formlabel and eventnames * add: logic to deactivate the features which are disabled for the plan * fix: PHP warning * fix: keyword name * add: GOLINKS * add: open link function * fix: PHP warning undefined key * update: logic to show the icon and added golinks * [APP-1045] Add billing tab (#223) * add: plan name and subscription link * update: refactor my account menu * update: move truncate email to a helper file * update: simplify truncation logic * [APP-1270] Delete transient and force info update (#236) * add: force update site/info on mismatch url * update: add a constant for the transient * add: delete_transient for switch account as well * add: delete_transient for disconnect as well * [APP-1267] Quota bar undefined (#234) * fix: undefined was shown when there is no quota data * add: preloader * fix: make bottom bar sticky on the settings pages (#237) * [APP-1268] Pro tip spacing (#235) * fix: pro tip spacing * fix: pro icon * [APP-1271] Align menu icons (#238) * update: hide info button on minimized sidebar * fix: alignment of quota bar icon * fix: conditional logic * update: improve sidebar motion * fix: switch account issue * update: upgrade link for analytics popup (#239) * [APP-1281] fix usage percentage formatting (#240) * fix: format display of percentage correctly. * update: fraction conversion logic * Force referer and lower transient time to 15 minutes [APP-1286] (#242) * reduce transient timeout * force referrer in script tags * [APP-1262] Enable routes for get statistic on disabled analytics (#233) * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1243] Admin upgrade notices (#241) * add: admin quota notices * add: fix function name and phpcs issues * fix: formatting issues * [APP-1287] change Mixpanel check for free trial (#243) * Fix/quota text (#244) * fix: wp notice close logic plus banner text * update: banner text * [APP-1292] missing mixpanel events (#245) * add: missing mixpanel events * update: use variable for hardcoded names * update: use variable for hardcoded names * [APP-1293] Add additional checks (#246) * update: add additional check to prevent fatal error * fix: formatting * [APP-1312] minimize client css (#252) * [APP-1168] widget icon radius * add: icon radius component * add: icon radius component * update: add support for widget radius * fix: minor ui fixes * fix: resolve comments * fix: alignment of the icon * update: add styled components * add: corner radius mixpanel event * fix: corner radius should have default values when no value is set based on icon * fix: icon radius input style * add: accessibility attributes * fix: active states color * add: logic to control invalid inputs * update: make aria attributes translatable * update: styled component names * add: spacing between the components * [APP-1342] add super props, store plan scope after register/switch (#250) * [APP-0000] store plan scope after register/switch * Update modules/settings/module.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * remove deprecated method * remove deprecated method * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel --------- Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * [Legacy] Added strict settings sanitization (#257) * [Legacy] Added strict settings sanitization * use correct esc_x method * hardcoded 6.8.0 * added svn for wp test library * fix: default border radius (#258) * fix: default border radius * add: default corner radius for new users * update: add support for default values for users with saved style settings * updated phpunit workflow * revert to master * hardcode 6.8.x * update: default values for existing users * update: remove saving default corner radius for new users * fix: update default radius for text icon * fix: PHPUnit tests for WP 6.8.0 * align with develop * set to latest --------- Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: Raz Ohad <ohad@elementor.com> * fix: widget icon spacing (#262) * Added custom gutenberg link to toggle widget [APP-1306] (#256) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] (#254) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] * typo Update modules/widget/components/ally-trigger.php * New: Add the what's new functionality [APP-1329] (#264) * add: statement page selector field (#261) * add: statement page selector field * add: updated the statement link button to a search field * fix: add support for create statement data * New: Bump the Notifications SDK to 1.2.0 [APP-1427] (#267) * Fix: Resolve a11y issues [APP-1331] (#269) * [APP-1417] Add support for custom icon (#270) * add: media upload button * add: support for custom icon * fix: code alignment, phpcs * fix: code alignment and linting * add: mixpanel events * fix: styling of custom svg * fix: missing variable * fix: missing variable * fix: load gutenberg block without css * fix: icon spacing in preview * fix: indentation * fix: indents * [APP-1440] Fix doing_it_wrong warning for translations (#271) * fix: doing_it_wrong warning for translations * update: stop explicitly loading translations * fix: add package-lock * fix: add package-lock * New: Store fonts inside the plugin [APP-1385] (#277) * add: what's new mixpanel event (#274) * fix:disable autofocus on opening of popup menu (#279) * New: Add the birthday banner [APP-1489] (#281) * [APP-1442] Add language selector option to plugin (#273) * add: language selector option * update: language selector option key * update: lang selector name (#284) * update: add language selector to analytics table (#285) * Tweak: Update the campaign's time range [APP-1489] (#283) * fix: container width logic (#292) * [APP-1530] scrollbars settings width (#296) * update: title layout * fix: width of the content * update: browserlist * fix: rtl issues (#304) * [APP-1629] Fix pro icon (#305) * update: @elementor/ui package * fix: pro icon * fix: pro icon * [APP-1678] Remove mixpanel session replay (#317) * Fix: plugin headers (#316) (#320) * [APP-907] Accessibility assistant (#326) * PHPCS and remediation POC WIP * WIP Wizard module * Added scanner module * [APP-929][APP-930] Add initial setup for wizard, added btn to the topbar (#230) * [APP-929][APP-930] * [APP-929][APP-930] * update logic * update init app * [APP-0000] store plan scope after register/switch * change return of load * add header * Move into shadow dom, add context, add headers components * add UI components * add UI components * add UI components * merge current develop * merge current develop * Add AltText Form * Add scroll to current element * Align with current design, add loader, added preview for svg * Align with current design, add loader, added preview for svg * Resolve comments * Resolve comments * Resolve comments * [APP-934] add submit logic (#259) * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * Added replace remediation action * Add submit logic * Add submit alt text logic, generate AI alt text * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation --------- Co-authored-by: Raz Ohad <admin@bainternet.info> * Add texts, add remediation submit, fix logic to store remediation * [APP-0000] add store request to the Service API (#268) * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-1432] fix with AI flow (#275) * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1446] sidebar menu update (#276) * update: simplify menu * add: headings and scanner menu options * [APP-945] add column for tables (#282) * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-1447] Updated quota bar designs (#278) * update: quota bar designs * fix: the popover was partially visible * update: AI credits name * update: usage calculation logic * add: quota indicators * update: quotas tooltip text * update: quotas notices text * update: make toggle icon dynamic * fix: @elementor/ui imports * Update modules/settings/assets/js/layouts/quota-bar.js Co-authored-by: VasylD <vasyld@elementor.red> * update: styling of component --------- Co-authored-by: VasylD <vasyld@elementor.red> * [APP-1507] add UI changes (#286) * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1387] add mixpanel events (#288) * [APP-1387] add mixpanel events * [APP-1387] add mixpanel events * New: Add the a11y assistant dashboard's UI [APP-1445] (#289) * [APP-1513] add disconnected msg (#290) * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues (#291) * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * fix: infotip icon padding and font style (#293) * fix: infotip icon padding and font style * fix: infotip icon padding and font style * update: caniuse database * [APP-1525] add edit mode (#294) * [APP-1525] add edit mode * [APP-1525] add edit mode * [APP-1525] add edit mode * Bug/app 1544 (#295) * Fix: Resolve QA comments [APP-1544] * New: Add beta tags [APP-1555] * New: Add the "no results" state [APP-1544] * [APP-1554] rename violations (#297) * [APP-1512] add backend logic for remediation management (#298) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Fix: Resolve QA comments [n/a] (#299) * [APP-1512] add FE remediation management (#300) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1609] fix tooltip * [APP-1609] fix resolved btn click * [APP-1401] clear cache on update (#302) * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * update with latest develop branch * fix copies * [APP-1619] add mixpanel event (#303) * [APP-1619] add mixpanel event * [APP-1619] add mixpanel event * [APP-1593] Add locked variant for quota bar (#301) * update: add locked version of quota status bar * fix: text color for infotip * fix: width issues * fix: add check for 0 * [APP-1637][APP-1643] add UI fixes, add excluded rules array (#307) * fix: make sidebar collapsible (#306) * Merge current dev * [APP-1603] Add dashboard menu (#309) * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * Bug/app 1607 (#311) * Fix: Update stats calculation logic [APP-1607] * Fix: Set fixed width for the results table [APP-1650] * Fix: Update filter rules [APP-1634] * New: Add the no search results state [APP-1651] * Fix: Convert indents [n/a] * [APP-1670] add menu on Manage Fixes (#315) * [APP-1670] add menu on Manage Fixes * [APP-1670] update menu * [APP-1611] fix comments * fix: direction of snippet (#313) * [APP-1561] New menu layout (#308) * update: app menu and layout * merge: latest changes from feature/remediation * add: alert indicator to the closed sidebar * fix: page layout for statement page * update: menu display names * fix: topbar menu layout * update: sidebar menu width * update: sidebar menu width * fix: popup menu layout * add: hover action to the toggle button * update: my account menu * fix: quota indicator for closed sidebar * fix: icon alignments * fix: scroll behaviour * fix: page scroll behaviour * fix: popup menu hover state * update: quota bar and group layouts * add: tooltips to the menu items * update: make scans page fixed height and scrollable * update: styles with theme references and added new styled components * fix: make sidebar smoother * update: accessibility page heading * Merge latest develop * [APP-1611] trigger save entry for clean cache (#314) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async (#319) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * fix: scrollbar issues (#318) * [APP-1615] add remediation for wp image (#321) * POC - FrontEnd remediations to handle Dynamic Data [APP-1644] (#312) * POC - FrontEnd remediations to handle Dynamic Data * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * added MutationObserver to cover elements that are added later on the page runs until remediations are all done, and disconnect * added $use_frontend flag instead of using "false" * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * WIP on poc/fe-remediations * [APP-0000] call trigger save async * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Small fixes * Small fixes * Small fixes * Small fixes --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> Co-authored-by: vasyldinets <vasyld@elementor.red> * [APP-1611] Fix cache issue (#324) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * [APP-1611] clear cache * [APP-1657] upgrade cta (#323) * update: added logic to show button based on plan * Update modules/settings/assets/js/components/quota-bar/quota-bar-group.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * fix: eslint error --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1658] Update accessibility admin column design (#322) * update: wpadmin column layout * update: move icon to assets * Fix: Resolve remediation encoding issue [APP-1646] (#325) --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1698] Update referrer policy (#333) * [APP-1697] fix menu, add category to events as key without translation (#334) * [APP-1697] fix menu, add category to events as key without translation * [APP-1697] fix menu, add category to events as key without translation * [APP-1717] Fix category title (#335) * [APP-1724] Fix get object type for singular (#338) * [APP-1724] Fix get object type for singular * [APP-1724] Fix get object type for singular * Update modules/remediation/classes/utils.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Fix: Resolve some a11y issues [APP-1664] (#337) * [APP-1696] Fix help menu ui (#339) * fix: menu ui * update: onclick action * fix: alignment of the menu * update: rename menu item to accessibility assistant * Fix: Use the same issue count in the WP admin and scanner [APP-1726] (#341) * Fix: Move data tag logic away from the component to prevent multiple renders [APP-1502] (#342) * [APP-1738] add case-insensitive replace (#345) * [APP-1738] add case-insensitive replace * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1741][APP-1742][APP-1743] add components, calc contrast ratio, add logic for lightness * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * update * update * update --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * bumped v3.5.1 * [APP-1776] Deactivate scanner on not connected (#350) --------- Co-authored-by: Yakir Sitbon <kingyes1@gmail.com> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: VasylD <vasyld@elementor.red> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Release/v3.5.2 (#355) * [APP-1784] Null offset warning (#353) * fix: offset warning when scan results are NULL * fix: phpcs issues * bumped v3.5.2 * Update README.md Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update readme.txt * [APP-0000] Add condition to init scanner module (#356) * Add condition to init scanner module * Update modules/scanner/module.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/scanner/module.php * Update modules/scanner/module.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> --------- Co-authored-by: Raz Ohad <ohad@elementor.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * updated changelog --------- Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> Co-authored-by: VasylD <vasyld@elementor.red> --------- Co-authored-by: Raz Ohad <ohad@elementor.com> Co-authored-by: Yakir Sitbon <kingyes1@gmail.com> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Tweak: Remove block scripts from front end (#359) * [APP-1766] Remove visit quota indications (#363) * update: hide quota notices * update: remove quota notices from the app * update: remove plan visit from quota bar and indicator * update: prevent notices from registering * Update modules/settings/module.php --------- Co-authored-by: Raz Ohad <ohad@elementor.com> * [APP-1727] Update column actions (#343) * update: column actions * add: short and long button formats with tooltips * update: simplify the tooltip approach * add: tooltip to the column title * update: move css to existing file * add: media query listeners for column resize * update: logic to resize the column and button * [APP-1823] Fix conflict with ajax requests (#362) * fix: conflict with ajax requests * update: remove unsused class import * [APP-1730] Add info details (#344) * update: refactor the toggle function * add: tooltip to analytics toggle * update: confirm dialog modal content * update: import * update: not enough data alert content * add: action to the alert and update text * update: alert and infotip color based on previous data * add: onclick handler to enable tracking * update: alertboxes colors * fix: show info only when analytics are enabled * update: manually control the tooltip behaviour * Update modules/settings/assets/js/components/sidebar-menu/tooltips/analytics.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * fix: linter errors --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Tweak: WPML Support [APP-1795] (#364) * [APP-1767] Update the scan stats UI (#352) * Release/v3.5.1 (#349) * Bump WP version * ♻️ Initial Refactor commit [APP-687] (#109) * Initial refactor commit * ✅ Added build and tests CI/CD * PR Rejects * Rejects leftover * Setup base (#110) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: settings variable * update: removed duplicate css import * Update modules/settings/assets/js/api/index.js Co-authored-by: VasylD <vasyld@elementor.red> --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: VasylD <vasyld@elementor.red> * [Infra] ✅ updated Github actions (#114) * updated github actions * removed composer github auth * PHPCS * removed package-lock.json from ignore to allow `npm ci` * added missing husky * ignore legacy * removed unused non existing import * Add connect modal (#111) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * fix: alignment and style * update: imports * update: removed conflicting imports * fix: add compatibility for mobile devices --------- Co-authored-by: Ohad <ohad@elementor.com> * [APP 705] add connect module, settings and notification component (#112) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports --------- Co-authored-by: Ohad <ohad@elementor.com> * [APP 707] general setting components (#113) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * Update modules/settings/assets/js/components/color-picker/style.css Co-authored-by: Raz Ohad <admin@bainternet.info> * update: color picker class name --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> * [App 780] Navigation Sidebar (#115) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * update: added translations * fix: admin top bar layout * update: exports of icons * update: exports of components * add: aliases for imports and fix exports * fix: height and styling of the layout * fix: unhide wp footer * update: keep widget menu open on page load (default) * update: linter rules to move first prop to new line * update: linter rules to move first prop to new line --------- Co-authored-by: Ohad <ohad@elementor.com> * Fix error on install plugin, add prettier (#116) * Feature/app 810 assemble icon settings page (#117) * Initial refactor commit * ✅ Added build and tests CI/CD * update: add src for admin settings * update: incorrect constant names * update: namespace * add: accessibility settings * update: webpack to output files inside a folder * update: build output folders * update: removed commented code * update: npm scripts * add: webpack config * add: hooks * update: move admin setting to the module folder * update: assets loading logic * update: add rule to move jsx props to multiline imporving readability * add: connect modal * update: hooks import for better readability * update: replace functions with hooks * add: connect module * add: settings and get settings route * add: hooks and contexts to get settings * add: hooks * add: notification component * add: data api * add: settings provider and connect settings * add: husky * add: icon size control * fix: icon size control labels * add: icon select component * add: color picker component * add: accessibility icons * add: icon export * update: add icons to the component * fix: styling for the icon select control * update: color picker with react-colorful component * update: icon size component with live icon design * fix: styling of radio boxes * add: icon design settings layout * add: position settings layout * add: layout exports * add: alignment matrix and position control components * add: position settings & position settings for mobile layout * fix: formatting and text-domain * update: filter names * fix: hook import * add: set function for settings * add: prop-types package * update: refactor notification component and context * update: remove filter for authorize url * update: imports and exports of hooks * update: plugin settings context filename and relevant imports * update: icons and icon imports * add: sidebar(wip) * update: fix width of connect screen on mobile * update: sidebar layout * Update modules/settings/assets/js/components/color-picker/style.css Co-authored-by: Raz Ohad <admin@bainternet.info> * update: color picker class name * add: credit card and user arrow icons * update: hidden wpfooter and fixed sidebar height * update: sidebar layout * add: basic page layouts * update: sidebar layout * add: sidebar menu, sidebar app bar and my account menu components * update: add sidebar and menu settings * update: add page layouts * update: admin top bar * add: bottom bar * add: bottom bar and top bar * add: bottom bar and top bar * update: page content styling * fix: styling * fix: styling * update: text domain * add: props to wrapper * add: icon design and position setting layouts * add: in page scroll behaviour to the settings * add: widget icons and getter function * update: icon design settings getter and setter functions * update: imports * add: mobile layout for position settings * add: icon position settings * add: icon position settings hooks and handlers * fix: alignment of controls in AlignmentMatrixControl * update: useSettings and usePositionSetting hooks and relevant functions * fix: colors of AlignmentMatrixControl * fix: styling of components and layouts * add: aliases * add: container wrapper to page * update: accessibility options rendering logic * fix: order of the icons * add: aliases for components and hooks imports * fix: styling of settings panel * fix: container height for settings page * update: toggle control states * add: widget icon settings * add: load saved widget icon settings * update: move layout to page for different designs per page * update: add changes tracking and disable button logic * add: async/await to save settings * update: convert options to array of objects * Update modules/settings/assets/js/components/bottom-bar/index.js Co-authored-by: VasylD <vasyld@elementor.red> * Update modules/settings/assets/js/app.js Co-authored-by: VasylD <vasyld@elementor.red> * fix: remove duplicate entries --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: VasylD <vasyld@elementor.red> * Feature/app 708 widget menu settings (#118) * add: icons for menu settings * add: placeholder layout for widget preview in menu settings * update: load saved settings and updated imports * add: logics for handling and saving menu settings * add: useSavedSettings hook * update: set export as default for Sidebar layout * add: widget menu settings layout and settings * update: add widget menu settings and widget preview layouts * add: hide/show minimum option alert notification * update: styling of the save button * update: save settings logic to use async/await * fix: accessibility text icon * update: app type (#119) * [APP-834] Update account menu buttons (#121) * update: account menu buttons * update: billing link * add: error handling for switch account * [APP-835] add service data (#122) * add: client functions * add: site register and site info endpoints * update: add plan data settings * update: add support for 201 response code * update: add plan data key * update: store the plan data on the once the site is registered * update: add filter for client url * add: retry registering in there is any error after connect * update: setting prefix * add: plan data * update: add account details to menu * fix: lint issues * update: add data checkbox support (#123) * [APP-928] Settings pointer (#125) * add: settings pointer * update: add alias for the settings * [APP-837] Add post connect modal (#120) * add: post connect modal * update: settings prefix * fix: connect modal design * update: connect modal text * add: connect modal graphics * update: connect modal icon * update: post connect modal * update: sidebar menu text * update: text of icon settings * update: text * update: php compatibility with return types * add: accessibility statement page structure (#126) * [APP-721] Render widget and global settings (#124) * add: webhook endpoint * add: widget module * add: default widget settings on successful registration * update: name of global object to ea11yWidget * update: remove json encoding to make objects available on the frontend * update: widget url, filter and enqueuing method * update: removed obsolete code * update: enqueue script only when connected * update: add check for valid plan data and key * update: conditional check * update: conditional check * fix: widget loading error (#128) * [Legacy] Upgrade To New [APP-949] (#127) * Added `Notice_Base` and `Notices` component to core module * Always load core module and load all other modules based on legacy status * added filter in customizer settings * added bubble / pimple in admin menu to indicate upgrade * added `Dismissible_Deprecated_Nag` notice to none legacy pages * added `Dismissible_Deprecated_Nag` notice to legacy pages * Added `Upgrade` component to legacy module includes: * loading of notices * introduction modal * admin menu pimple * customizer notice * pointer * confirmation modal * upgrade logic and handler * ✅ Fixed legacy module test * added `local:quick-run` command to run in browser mode * update phpunit workflow * ensure wp.ajax is loaded * wrong translations * Updated strings * added "Equally" * remove unused test * ✅ use custom version of wp test library (#129) * ✅ use custom version of wp test library * cleanup * update WP versions for testing * [APP-711] Widget preview (#130) * add: dynamic script loader for widget * update: settings name * update: settings save function and comments * update: tools settings object structure * add: widget preview section * update: added setting page slug as a constant * update: enqueue widget for preview in the settings * add: widget icon assets link * add: widget icon svgs * update: store widget url in a constant * update: store widget url in a constant * update: trigger widget preview update on menu item changes * update: remove the icon option from the frontend. * update: add widget URL * update: plan data setting type * update: widget plan url * update: widget plan url and parse plan data * fix: phpcs error ext-json missing * fix: widget url * fix: save and use plan data as a serialized option * fix: use template string for widget url * [APP-908] Accessibility generator (#131) * add: accessibility statement radio icons * update: add form group on radio buttons * add: statement generator * add: statement generator * add: accessibility statement data option * update: create page in WordPress and save it to the option * update: exclude zip file from the git * update: render statement page conditionally * add: statement link layout and settings * add: preload statement data * update: publish the created page and add link for it * update: changed Dynamic Script Loader to WidgetLoader * add: accessibility statement url * update: text and styling * update: styling of the preview text * update: restructure statement generator * add: support for dynamic update in statement links * update: remove index.css file for widget loader * add: widget styling for settings page * add: empty link when hide link is enabled * update: statement page structure and logic * fix: typo * update: convert component into a styled component * fix: styling and layout * update: icons * update: convert radio buttons to styled component * fix: typo and style * add: fading for the link preview * update: import * update: styling and spacing * fix: sidebar layout * update: wpcs to latest version * fix: spacing * fix: wpcs version * add: check for valid statement page * fix: jitters on rendering * fix: use escape attribute * update: settings menu slug and plugin name * fix: menu item rendering * update: definition of the styled text field * add: addPage function to the API * fix: add notification on page creation * add: copy link icon * update: optimize SVGs * [APP-908] Additional fixes (#133) * fix: text domains * updated: styled component syntax * update: use await instead of then * fix: prevent application crash in case widget fails to load * add: generated info tip card * update: refactor function * Fix: Fix the QA bugs [n/a] (#135) * [APP-830] Add mixpanel events (#134) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel (#136) * [APP-830] Add mixpanel events * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * Merge branch 'develop' into feature/APP-830-add-mixpanel # Conflicts: # .gitignore # modules/settings/assets/js/components/sidebar-menu/index.js # modules/settings/assets/js/pages/accessibility-statement.js * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] Add user to init Mixpanel * [APP-830] rename events (#137) * Connect and Preview Fixes (#139) * updated connect admin page * Use unified widget URL instead of hardcoded Js to support envs * Removed enqueue of fictional widget.js and reuse settings `admin` handle * Fix: Fix the QA bugs [n/a] (#138) * New: Finish the BE integration [n/a] * Fix: Fix some bugs [n/a] * upgrade flow UI and design tweaks [app-949] (#141) * Updated Learn More links with UTM's * Tweaked Pointer strings Icon and CTA * dismissible notice strings * sticky notice strings * updated upgrade flow design for pointer, notices, introduction modal, and confirmation modal * added build script * [APP-979] Update links and plugin name (#140) * Ensure loading of legacy widget based on any saved data and fixed legacy JS * Bug/app 1002 (#143) * Bug: Update the logo in the "Hide Widget" modal [APP-1001] * Fix: Update the side menu spaces [APP-1002] * [APP-991] Add translation for statement (#142) * [APP-979] Update links and plugin name * [APP-991] Add translation for statement * Set Prod Widget URL * [APP-1004][APP-1005][APP-1006] Fix generator UI and logic, fix statement UI, fix copy link (#144) * [APP-1004] Fix generator UI and logic * [APP-1005] Fix statement UI * [APP-1005] Fix statement UI * Mixpanel record session * Fix: Enhance position values validation [APP-1009] (#146) * Bug/app 1003 (#147) * Fix: Add a border to the preview [n/a] * Fix: Fix Capabilities screen UI [APP-1003] * [APP-1020] add missed events (#148) * [APP-1015] fix switch account (#149) * [APP-1015] fix switch account (#150) * [APP-1021] Fix switch modal ui (#151) * fix: ui issues * fix: translation strings * [APP-912] add default settings for RTL (#152) * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-912] add default settings for RTL * [APP-1026] Remove HTML breaking <style> tag & update pointer logic (#153) * fix: remove extra closing tag * update: hide settings pointer when plugin settings is opened * update: remove unused functions * update: add help text to mobile position settings * Bug/app 1003 (#157) * Fix: Add missed translations [n/a] * Fix: Refresh the plan data on page load [n/a] * New: Add loader to the settings [n/a] * update: delete lock key after each check (#160) * New: Update dashboard icon size [n/a] (#158) * New: Update dashboard icon size [n/a] * Fix: Fix widget previews [n/a] * [APP-1018] Help menu change (#155) * update: remove accessibility word from menu items * update: remove top bar * update: add help button to the sidebar * update: re-add spacing in styled css code * update: create styled components * [APP-973] Add an UTM for users upgrading from one click to the new widget (#165) * update: ui of the statement preview (#166) * [APP-1011][APP-1013] focus outline and sitemap settings (#161) * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * [APP-1011][APP-1013] focus outline and sitemap settings * update: video link (#167) * [APP-1051] Fix layout on the small and medium devices (#156) * fix: layout on the small and medium devices * update: change components to styled components * refactor: position settings wrapper into a separate component * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel (#169) * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1012][APP-1085] Add skip to content settings and event for Mixpanel * [APP-1048] Add tooltip to accessibility statement (#159) * add: tooltip to accessibility statement * update: hide infotip when statement link is set * update: infotip's text * fix: infotip naming and logic * [APP-1049] Add back button accessibility statement (#164) * add: back button to the statement link section * add: Edit link button to statement page section * update: add admin_url and generate query args properly * update: learn more link for accessibility statement page (#168) * Fix: Update overlay height [n/a] (#171) * Fix settings and connect issues (#170) * fix: token fails to refresh after expiry * update: add 12 hour time for plan data refresh and fix missing subscription id * update: add check to refresh plan data * fix: decoding errors and alignment and add logging for errors * update: refresh logic and formatting * Update/app 1029 app name (#173) * update: plugin name * update: default menu option * update: menu structure * update: add inline checks * update: reduce padding on app icon in menu * fix: height of the modal * update: app menu icon color * update: menu icon colors * fix: menu icon size * update: plugin names * update: HELP_LINK * update: app name * update: icon background color * update: icon size * fix: admin icon size * fix: width of the sidebar * Fix/toggle not working properly (#174) * fix: toggles not working properly in some cases * fix: saving of the settings was not working * add: missing adminUrl in settings data * fix: switch was not working properly in some cases (#175) * Fix/app 1093 incorrect position on default (#176) * fix: switch was not working properly in some cases * fix: default setting structure for the icon position * [APP-1096] Text changes (#177) * fix: switch was not working properly in some cases * update: plugin name and action buttons title * fix: revert change to is_active function * fix: button color * New: Add the skip link [APP-1012] (#179) * [APP-1097] Fix preview load (#178) * [APP-1097] Fix preview load * [APP-1097] Fix preview load * [APP-1097] Fix preview load * Update modules/settings/assets/js/components/widget-loader/index.js --------- Co-authored-by: Raz Ohad <ohad@elementor.com> * [APP-1123] Accessibility statement text (#181) * fix: switch was not working properly in some cases * update: accessibility statement content * [APP-1121] Add support for react-jsx-runtime for older WP versions (#180) * fix: switch was not working properly in some cases * update: revert wp-scripts version to 28.0.0 to add support for older WordPress versions * update: revert wp-scripts to 27.9.0 * add: support for react-jsx-runtime in older versions of WordPress * update: version to the latest wp-scripts 30.3.0 * update: add lib/ to gitignore * update: plugin name * Fix: Fix admin widget previews [n/a] (#183) * [APP-1061] change mixpanel user id (#184) * [APP-1129] change toggle_event for mixpanel (#186) * Remove skip to content btn if anchor does not exist (#187) * fix: hide wp notices to keep the layout from shifting (#189) * [APP-1143] fix bug with capability display (#195) * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * [APP-1143] fix bug with capability display * add: loading text to widget preview (#196) * [APP-1142] add 'appType' super props, change identify key (#191) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1142] Add 'appType' super props * [APP-1144] Accessibility statement tooltip text update (#198) * update: text * update: switch design * Tweak: Update widget loaders [n/a] (#197) * added images to readme (#172) * added images to readme * updated readme * V3.0.0 * updated readme * updated tested up to * Fix: Update the skip link rendering hook [APP-1157] (#203) * bumped v3.0.1 (#206) * Fix: Adapt widget preview to smaller height viewports [APP-1130] (#217) * update: convert menu icon to base64 svg (#199) * update: convert menu icon to base64 svg * update: logo to svg logo with base64 encoded * update: svg app icon * [APP-1201] Improve admin panel accessibility (#220) * [APP-1201] add accessibility rules * [APP-1201] add accessibility rules * [APP-1210] add prop to Mixpanel, move event names to const (#225) * [APP-1159] Add mismatch URL flow (#210) * update: convert imports to named imports * add: function to check if current screen is settings page * update: rename elementor logo to app logo * add: url mismatch flow and components * update: remove obsolete code * Update modules/connect/rest/authorize.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * Update modules/settings/module.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * fix: modal was not closing * update: remove url mismatch notice * update: mismatch modal and rendering logic * add: toast notifications for errors * update: convert components into styled components * update: remove bottom border from the dialog * update: text copy * fix: logo alignment * update: renamed styled component --------- Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * [APP-1108][APP-1109][APP-1110] Add analytics backend logic (#190) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1101] Move action button to footer (#208) * update: add save changes footer to the bottom and remove it from capabilities * add: logic to save settings for skiptocontent using footer * update: text * update: convert component to styled component * [APP-1198] [APP-1199] Quota bar and notices (#219) * add: quota bar * add: openLink helper function * add: styled elements and visits link placeholder * update: remove hover state from the box * add: quota notices * update: quota access and usage calculations * add: logic to calculate plan usage * update: move logic to calculate plan usage to hook * add: todo note * add: todos * add: mixpanel events * fix: hide quota bar when sidebar is minimized * fix: settings panel was not expanding when sidebar is minimized * update: text and structure of the bar * update: quota calculation logic * update: remove TODOs * update: text and values * fix: height of the container for icon settings * update: golinks * update: golinks * fix: prevent icon options from wrapping on smaller screen sizes (#229) * [APP-1107] Add dashboard for analytics (#204) * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * [APP-1108][APP-1109][APP-1110] Add analytics backend logic * Add nonce to the widget settings * Update routes and DB table * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * Fix comments * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1107] Add dashboard for analytics * [APP-1201] add accessibility rules * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] fixed API endpoint * [APP-1107] add check for is_active * update to the latest * update to the latest * update to the latest * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * fix bugs, add changes * [APP-1105] Add pro capabilities (#205) * add: volume and solid crown icon * add: volume and crown icons to export * update: refactor menu item to a new component * add: screen reader to the menu items and reorganize them * add: pro item infotip content * add: capabilities item and pro info tip to exports * update: import ProInfoTip component and change disabled logic * update: imports * update: refactor pro item infotip into the separate component * update: refactor infotip and add comments * add: custom switch component * add: logo settings layout * update: switch component * add: useToggleSetting hook to manage widget settings. * update: move pro feature key to a separate constant * fix: pro icon style * update: remove branding key * update: pro enable check structure * update: pro enabled check structure * update: key name * update: update key before checking for it * fix: null error * add: update logic to get the tools settings based on plan * update: exclude remove-elementor-label from the minimum option rule * update: add formlabel and eventnames * add: logic to deactivate the features which are disabled for the plan * fix: PHP warning * fix: keyword name * add: GOLINKS * add: open link function * fix: PHP warning undefined key * update: logic to show the icon and added golinks * [APP-1045] Add billing tab (#223) * add: plan name and subscription link * update: refactor my account menu * update: move truncate email to a helper file * update: simplify truncation logic * [APP-1270] Delete transient and force info update (#236) * add: force update site/info on mismatch url * update: add a constant for the transient * add: delete_transient for switch account as well * add: delete_transient for disconnect as well * [APP-1267] Quota bar undefined (#234) * fix: undefined was shown when there is no quota data * add: preloader * fix: make bottom bar sticky on the settings pages (#237) * [APP-1268] Pro tip spacing (#235) * fix: pro tip spacing * fix: pro icon * [APP-1271] Align menu icons (#238) * update: hide info button on minimized sidebar * fix: alignment of quota bar icon * fix: conditional logic * update: improve sidebar motion * fix: switch account issue * update: upgrade link for analytics popup (#239) * [APP-1281] fix usage percentage formatting (#240) * fix: format display of percentage correctly. * update: fraction conversion logic * Force referer and lower transient time to 15 minutes [APP-1286] (#242) * reduce transient timeout * force referrer in script tags * [APP-1262] Enable routes for get statistic on disabled analytics (#233) * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1262] Enable routes for get statistic on disabled analytics * [APP-1243] Admin upgrade notices (#241) * add: admin quota notices * add: fix function name and phpcs issues * fix: formatting issues * [APP-1287] change Mixpanel check for free trial (#243) * Fix/quota text (#244) * fix: wp notice close logic plus banner text * update: banner text * [APP-1292] missing mixpanel events (#245) * add: missing mixpanel events * update: use variable for hardcoded names * update: use variable for hardcoded names * [APP-1293] Add additional checks (#246) * update: add additional check to prevent fatal error * fix: formatting * [APP-1312] minimize client css (#252) * [APP-1168] widget icon radius * add: icon radius component * add: icon radius component * update: add support for widget radius * fix: minor ui fixes * fix: resolve comments * fix: alignment of the icon * update: add styled components * add: corner radius mixpanel event * fix: corner radius should have default values when no value is set based on icon * fix: icon radius input style * add: accessibility attributes * fix: active states color * add: logic to control invalid inputs * update: make aria attributes translatable * update: styled component names * add: spacing between the components * [APP-1342] add super props, store plan scope after register/switch (#250) * [APP-0000] store plan scope after register/switch * Update modules/settings/module.php Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * remove deprecated method * remove deprecated method * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel * [1342] Add super prop to mixpanel --------- Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> * [Legacy] Added strict settings sanitization (#257) * [Legacy] Added strict settings sanitization * use correct esc_x method * hardcoded 6.8.0 * added svn for wp test library * fix: default border radius (#258) * fix: default border radius * add: default corner radius for new users * update: add support for default values for users with saved style settings * updated phpunit workflow * revert to master * hardcode 6.8.x * update: default values for existing users * update: remove saving default corner radius for new users * fix: update default radius for text icon * fix: PHPUnit tests for WP 6.8.0 * align with develop * set to latest --------- Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: Raz Ohad <ohad@elementor.com> * fix: widget icon spacing (#262) * Added custom gutenberg link to toggle widget [APP-1306] (#256) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] (#254) * New: Added Ally Trigger Dynamic Tag for Elementor [APP-1305] * typo Update modules/widget/components/ally-trigger.php * New: Add the what's new functionality [APP-1329] (#264) * add: statement page selector field (#261) * add: statement page selector field * add: updated the statement link button to a search field * fix: add support for create statement data * New: Bump the Notifications SDK to 1.2.0 [APP-1427] (#267) * Fix: Resolve a11y issues [APP-1331] (#269) * [APP-1417] Add support for custom icon (#270) * add: media upload button * add: support for custom icon * fix: code alignment, phpcs * fix: code alignment and linting * add: mixpanel events * fix: styling of custom svg * fix: missing variable * fix: missing variable * fix: load gutenberg block without css * fix: icon spacing in preview * fix: indentation * fix: indents * [APP-1440] Fix doing_it_wrong warning for translations (#271) * fix: doing_it_wrong warning for translations * update: stop explicitly loading translations * fix: add package-lock * fix: add package-lock * New: Store fonts inside the plugin [APP-1385] (#277) * add: what's new mixpanel event (#274) * fix:disable autofocus on opening of popup menu (#279) * New: Add the birthday banner [APP-1489] (#281) * [APP-1442] Add language selector option to plugin (#273) * add: language selector option * update: language selector option key * update: lang selector name (#284) * update: add language selector to analytics table (#285) * Tweak: Update the campaign's time range [APP-1489] (#283) * fix: container width logic (#292) * [APP-1530] scrollbars settings width (#296) * update: title layout * fix: width of the content * update: browserlist * fix: rtl issues (#304) * [APP-1629] Fix pro icon (#305) * update: @elementor/ui package * fix: pro icon * fix: pro icon * [APP-1678] Remove mixpanel session replay (#317) * Fix: plugin headers (#316) (#320) * [APP-907] Accessibility assistant (#326) * PHPCS and remediation POC WIP * WIP Wizard module * Added scanner module * [APP-929][APP-930] Add initial setup for wizard, added btn to the topbar (#230) * [APP-929][APP-930] * [APP-929][APP-930] * update logic * update init app * [APP-0000] store plan scope after register/switch * change return of load * add header * Move into shadow dom, add context, add headers components * add UI components * add UI components * add UI components * merge current develop * merge current develop * Add AltText Form * Add scroll to current element * Align with current design, add loader, added preview for svg * Align with current design, add loader, added preview for svg * Resolve comments * Resolve comments * Resolve comments * [APP-934] add submit logic (#259) * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * Added replace remediation action * Add submit logic * Add submit alt text logic, generate AI alt text * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation --------- Co-authored-by: Raz Ohad <admin@bainternet.info> * Add texts, add remediation submit, fix logic to store remediation * [APP-0000] add store request to the Service API (#268) * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-1432] fix with AI flow (#275) * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1446] sidebar menu update (#276) * update: simplify menu * add: headings and scanner menu options * [APP-945] add column for tables (#282) * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-1447] Updated quota bar designs (#278) * update: quota bar designs * fix: the popover was partially visible * update: AI credits name * update: usage calculation logic * add: quota indicators * update: quotas tooltip text * update: quotas notices text * update: make toggle icon dynamic * fix: @elementor/ui imports * Update modules/settings/assets/js/layouts/quota-bar.js Co-authored-by: VasylD <vasyld@elementor.red> * update: styling of component --------- Co-authored-by: VasylD <vasyld@elementor.red> * [APP-1507] add UI changes (#286) * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1387] add mixpanel events (#288) * [APP-1387] add mixpanel events * [APP-1387] add mixpanel events * New: Add the a11y assistant dashboard's UI [APP-1445] (#289) * [APP-1513] add disconnected msg (#290) * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues (#291) * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * fix: infotip icon padding and font style (#293) * fix: infotip icon padding and font style * fix: infotip icon padding and font style * update: caniuse database * [APP-1525] add edit mode (#294) * [APP-1525] add edit mode * [APP-1525] add edit mode * [APP-1525] add edit mode * Bug/app 1544 (#295) * Fix: Resolve QA comments [APP-1544] * New: Add beta tags [APP-1555] * New: Add the "no results" state [APP-1544] * [APP-1554] rename violations (#297) * [APP-1512] add backend logic for remediation management (#298) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Fix: Resolve QA comments [n/a] (#299) * [APP-1512] add FE remediation management (#300) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1609] fix tooltip * [APP-1609] fix resolved btn click * [APP-1401] clear cache on update (#302) * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * update with latest develop branch * fix copies * [APP-1619] add mixpanel event (#303) * [APP-1619] add mixpanel event * [APP-1619] add mixpanel event * [APP-1593] Add locked variant for quota bar (#301) * update: add locked version of quota status bar * fix: text color for infotip * fix: width issues * fix: add check for 0 * [APP-1637][APP-1643] add UI fixes, add excluded rules array (#307) * fix: make sidebar collapsible (#306) * Merge current dev * [APP-1603] Add dashboard menu (#309) * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * Bug/app 1607 (#311) * Fix: Update stats calculation logic [APP-1607] * Fix: Set fixed width for the results table [APP-1650] * Fix: Update filter rules [APP-1634] * New: Add the no search results state [APP-1651] * Fix: Convert indents [n/a] * [APP-1670] add menu on Manage Fixes (#315) * [APP-1670] add menu on Manage Fixes * [APP-1670] update menu * [APP-1611] fix comments * fix: direction of snippet (#313) * [APP-1561] New menu layout (#308) * update: app menu and layout * merge: latest changes from feature/remediation * add: alert indicator to the closed sidebar * fix: page layout for statement page * update: menu display names * fix: topbar menu layout * update: sidebar menu width * update: sidebar menu width * fix: popup menu layout * add: hover action to the toggle button * update: my account menu * fix: quota indicator for closed sidebar * fix: icon alignments * fix: scroll behaviour * fix: page scroll behaviour * fix: popup menu hover state * update: quota bar and group layouts * add: tooltips to the menu items * update: make scans page fixed height and scrollable * update: styles with theme references and added new styled components * fix: make sidebar smoother * update: accessibility page heading * Merge latest develop * [APP-1611] trigger save entry for clean cache (#314) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async (#319) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * fix: scrollbar issues (#318) * [APP-1615] add remediation for wp image (#321) * POC - FrontEnd remediations to handle Dynamic Data [APP-1644] (#312) * POC - FrontEnd remediations to handle Dynamic Data * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * added MutationObserver to cover elements that are added later on the page runs until remediations are all done, and disconnect * added $use_frontend flag instead of using "false" * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * WIP on poc/fe-remediations * [APP-0000] call trigger save async * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Small fixes * Small fixes * Small fixes * Small fixes --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> Co-authored-by: vasyldinets <vasyld@elementor.red> * [APP-1611] Fix cache issue (#324) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * [APP-1611] clear cache * [APP-1657] upgrade cta (#323) * update: added logic to show button based on plan * Update modules/settings/assets/js/components/quota-bar/quota-bar-group.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * fix: eslint error --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1658] Update accessibility admin column design (#322) * update: wpadmin column layout * update: move icon to assets * Fix: Resolve remediation encoding issue [APP-1646] (#325) --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1698] Update referrer policy (#333) * [APP-1697] fix menu, add category to events as key without translation (#334) * [APP-1697] fix menu, add category to events as key without translation * [APP-1697] fix menu, add category to events as key without translation * [APP-1717] Fix category title (#335) * [APP-1724] Fix get object type for singular (#338) * [APP-1724] Fix get object type for singular * [APP-1724] Fix get object type for singular * Update modules/remediation/classes/utils.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Fix: Resolve some a11y issues [APP-1664] (#337) * [APP-1696] Fix help menu ui (#339) * fix: menu ui * update: onclick action * fix: alignment of the menu * update: rename menu item to accessibility assistant * Fix: Use the same issue count in the WP admin and scanner [APP-1726] (#341) * Fix: Move data tag logic away from the component to prevent multiple renders [APP-1502] (#342) * [APP-1738] add case-insensitive replace (#345) * [APP-1738] add case-insensitive replace * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1741][APP-1742][APP-1743] add components, calc contrast ratio, add logic for lightness * Update modules/remediation/assets/js/actions/replace.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * update * update * update --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * bumped v3.5.1 * [APP-1776] Deactivate scanner on not connected (#350) --------- Co-authored-by: Yakir Sitbon <kingyes1@gmail.com> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: VasylD <vasyld@elementor.red> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * update: layout of the scan results stats * add: Resolved issues by category section * fix: scan stats ui * update: change colors to primitive values * update: add proptypes to the issuebycategory * update: show dash for 0% --------- Co-authored-by: Raz Ohad <ohad@elementor.com> Co-authored-by: Yakir Sitbon <kingyes1@gmail.com> Co-authored-by: VasylD <vasyld@elementor.red> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1747] add parent selector (#360) * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * Add mixpanel events * Add mixpanel events * Add mixpanel events * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Update modules/remediation/assets/js/actions/styles.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Exclude adminbar from css rule * Exclude adminbar from css rule * Update modules/scanner/assets/js/hooks/use-color-contrast-form.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Exclude adminbar from css rule * Exclude adminbar from css rule * fix quota * fix quota * fix quota * fix quota * fix quota * fix quota * fix quota * fix linter --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * update: show infotip only when pro feature is active (#365) * [APP-1825] Add remove/disable category (#366) * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * [APP-1747] add parent selector * Add mixpanel events * Add mixpanel events * Add mixpanel events * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Exclude adminbar from css rule * Update modules/remediation/assets/js/actions/styles.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Exclude adminbar from css rule * Exclude adminbar from css rule * Update modules/scanner/assets/js/hooks/use-color-contrast-form.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Exclude adminbar from css rule * Exclude adminbar from css rule * fix quota * fix quota * fix quota * fix quota * fix quota * fix quota * fix quota * fix linter * [APP-1825] Add remove/disable category * [APP-1825] Add remove/disable category --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * update:tooltip text (#368) * [APP-1837][APP-1833] Fix 'Review issues' btn, submit only changed color (#367) * [APP-1835] add potential violation for color contrast, fix selector (#369) * [APP-1835] add potential violation for color contrast, fix selector * [APP-1835] add potential violation for color contrast, fix selector * [APP-1835] add potential violation for color contrast, fix selector * update: add spacing on sides for smaller screens (#370) * fix: analytics tooltip behaviour (#372) * [APP-1843] fix issue with draft page url (#371) * [APP-1835] add potential violation for color contrast, fix selector * [APP-1835] add potential violation for color contrast, fix selector * [APP-1835] add potential violation for color contrast, fix selector * [APP-1843] fix issue with draft page url * [APP-1843] fix issue with draft page url * [APP-1843] fix issue with draft page url * [APP-1843][1845] fix issue with draft page url, prevent error for gradient (#373) * [APP-1843] fix issue with draft page url * [APP-1845] Prevent error on background-image color contrast issue * [APP-1845] Prevent error on background-image color contrast issue * fix: bottom bar (#374) * bumped v3.6.0 * js lint * update: hide admin notices from settings page (#375) --------- Co-authored-by: Yakir Sitbon <kingyes1@gmail.com> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: VasylD <vasyld@elementor.red> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com>
This commit is contained in:
parent
077da37fbb
commit
1d4168efb4
83 changed files with 5379 additions and 1691 deletions
17
README.md
17
README.md
|
@ -5,7 +5,7 @@
|
|||
**Requires at least:** 6.6 \
|
||||
**Tested up to:** 6.8 \
|
||||
**Requires PHP:** 7.4 \
|
||||
**Stable tag:** 3.5.2 \
|
||||
**Stable tag:** 3.6.0 \
|
||||
**License:** GPLv2 or later
|
||||
|
||||
Ally: Make your site more inclusive by scanning for accessibility violations, fixing them easily, and adding a usability widget and accessibility statement.
|
||||
|
@ -187,6 +187,10 @@ Yes. You can rescan a URL as often as needed. Results update each time based on
|
|||
|
||||
These are smart suggestions generated by Ally to help you resolve issues more efficiently-like automatically suggesting alternative text for images. AI fixes are available only on paid plans and use credits.
|
||||
|
||||
### How can I report security bugs?
|
||||
|
||||
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. [Report a security vulnerability](https://patchstack.com/database/wordpress/plugin/pojo-accessibility/vdp).
|
||||
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
@ -213,12 +217,21 @@ These are smart suggestions generated by Ally to help you resolve issues more ef
|
|||
|
||||
## Changelog
|
||||
|
||||
### 3.6.0 - 2025-08-02
|
||||
|
||||
* New: Smart color contrast remediation flow in the accessibility assistant
|
||||
* Tweak: Updated scan dashboard to show open issues and issue breakdown by category
|
||||
* Tweak: Tooltip on analytics tab encouraging tracking activation
|
||||
* Tweak: Improve accessibility column in WP admin for better user experience
|
||||
* Fix: Added WPML compatibility
|
||||
* Fix: WooCommerce AJAX conflict
|
||||
|
||||
|
||||
### 3.5.2 - 2025-07-28
|
||||
|
||||
* Tweak: Improved performance by enqueuing Assistant only when logged in
|
||||
* Fix: Admin post columns offset warning
|
||||
|
||||
|
||||
### 3.5.1 - 2025-07-23
|
||||
|
||||
* Tweak: Admin panel UI updates
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#accessibility_status, .accessibility_status {
|
||||
width: 265px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.accessibility_status.column-accessibility_status {
|
||||
|
@ -10,7 +10,7 @@
|
|||
gap: 16px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 265px;
|
||||
width: auto;
|
||||
|
||||
&__stats {
|
||||
display: flex;
|
||||
|
@ -61,12 +61,160 @@
|
|||
}
|
||||
|
||||
&__actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.button {
|
||||
width: 112px;
|
||||
min-width: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* CSS tooltips */
|
||||
.ea11y-tooltip {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 9999999;
|
||||
padding: 6px 8px 5px;
|
||||
border-radius: 3px;
|
||||
opacity: 0;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
text-shadow: none;
|
||||
font: normal normal 11px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
letter-spacing: normal;
|
||||
text-transform: none;
|
||||
word-wrap: break-word;
|
||||
content: attr(data-label);
|
||||
pointer-events: none;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
}
|
||||
|
||||
&::before {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 9999999;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 5px solid transparent;
|
||||
opacity: 0;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
content: "\00a0";
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&:hover::before,
|
||||
&:hover::after,
|
||||
&:focus::before,
|
||||
&:focus::after {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
animation-name: ea11y-tooltip-appear;
|
||||
animation-duration: 0.1s;
|
||||
animation-timing-function: ease-in;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
|
||||
// North tooltip (above button)
|
||||
&-n::after {
|
||||
right: 50%;
|
||||
bottom: 100%;
|
||||
margin-bottom: 5px;
|
||||
transform: translateX(50%);
|
||||
}
|
||||
|
||||
&-n::before {
|
||||
top: -5px;
|
||||
right: 50%;
|
||||
bottom: auto;
|
||||
margin-right: -5px;
|
||||
border-top-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
// Hide tooltips when not needed
|
||||
&-hidden::before,
|
||||
&-hidden::after {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes ea11y-tooltip-appear {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Accessibility button enhancements */
|
||||
.ea11y-accessibility-button {
|
||||
position: relative;
|
||||
transition: all 0.2s ease;
|
||||
overflow: visible; /* IE 11 needs this for buttons */
|
||||
min-height: 24px !important;
|
||||
font-size: 11px !important;
|
||||
|
||||
&:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: 2px solid #0073aa;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
|
||||
.ea11y-button-text {
|
||||
white-space: nowrap;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
}
|
||||
|
||||
/* Column title responsive behavior */
|
||||
.ea11y-column-title {
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
/* Hide column title when column is too narrow */
|
||||
@container (max-width: 80px) {
|
||||
.ea11y-column-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fallback for browsers without container queries */
|
||||
@media screen and (max-width: 480px) {
|
||||
.ea11y-column-title {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive behavior for narrow columns */
|
||||
@media screen and (max-width: 782px) {
|
||||
.ea11y-accessibility-button .ea11y-button-text {
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Dark mode support */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.ea11y-tooltip::after {
|
||||
background: #2c3338;
|
||||
color: #f0f0f1;
|
||||
}
|
||||
|
||||
.ea11y-tooltip-n::before {
|
||||
border-top-color: #2c3338;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
gap: 6px;
|
||||
}
|
||||
|
||||
.ea11y-scanner-current-element {
|
||||
.ea11y-scanner-current-element, .ea11y-scanner-color-element, .ea11y-scanner-background-element {
|
||||
box-sizing: border-box;
|
||||
border: 4px solid #2563EB;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
@ -20,4 +21,6 @@
|
|||
overflow-y: scroll;
|
||||
overflow-x: visible;
|
||||
z-index: 999999;
|
||||
pointer-events: none;
|
||||
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
|
||||
}
|
||||
|
|
|
@ -46,6 +46,10 @@ export const mixpanelEvents = {
|
|||
applyFixButtonClicked: 'apply_fix_button_clicked',
|
||||
copySnippetClicked: 'copy_snippet_clicked',
|
||||
editSnippetClicked: 'edit_snippet_clicked',
|
||||
contrastColorChanged: 'contrast_color_changed',
|
||||
contrastResetClicked: 'contrast_reset_clicked',
|
||||
backgroundAdaptorTriggered: 'background_adaptor_triggered',
|
||||
backgroundAdaptorChanged: 'background_adaptor_changed',
|
||||
|
||||
// Accessibility assistant dashboard
|
||||
assistantDashboardHistoryLogsButtonClicked: 'history_logs_button_clicked',
|
||||
|
|
|
@ -17,6 +17,8 @@ const init = async () => {
|
|||
}
|
||||
|
||||
const pluginEnv = ea11ySettingsData?.pluginEnv || ea11yScannerData?.pluginEnv;
|
||||
const pluginVersion =
|
||||
ea11ySettingsData?.pluginVersion || ea11yScannerData?.pluginVersion;
|
||||
|
||||
await mixpanel.init(MIXPANEL_TOKEN, {
|
||||
debug: pluginEnv === 'dev',
|
||||
|
@ -27,6 +29,7 @@ const init = async () => {
|
|||
mixpanel.register({
|
||||
productName: 'app_access',
|
||||
appType: 'Apps',
|
||||
version: pluginVersion,
|
||||
environment: pluginEnv,
|
||||
is_trial: Boolean(plan?.name?.toLowerCase().includes('free')),
|
||||
plan_type: plan?.name,
|
||||
|
@ -41,6 +44,7 @@ const init = async () => {
|
|||
$subscription_type: plan?.name,
|
||||
$subscription_id: plan?.subscription_id,
|
||||
$subscription_status: plan?.status,
|
||||
$scanned_urls: `${planData?.scannedPages?.used || 0}/${planData?.scannedPages?.allowed || 0}`,
|
||||
};
|
||||
|
||||
mixpanel.people?.set_once(userData);
|
||||
|
|
3
assets/images/check-icon.svg
Normal file
3
assets/images/check-icon.svg
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17.2192 5.28107C16.9141 4.97597 16.4194 4.97597 16.1143 5.28107L8.33341 13.062L4.71918 9.44774C4.41408 9.14264 3.91942 9.14264 3.61432 9.44774C3.30922 9.75283 3.30922 10.2475 3.61432 10.5526L7.78099 14.7193C8.08608 15.0244 8.58074 15.0244 8.88584 14.7193L17.2192 6.38592C17.5243 6.08083 17.5243 5.58617 17.2192 5.28107Z" fill="#0A875A"/>
|
||||
</svg>
|
After Width: | Height: | Size: 451 B |
|
@ -104,10 +104,9 @@ class Assets {
|
|||
* @param string $handle
|
||||
* @param bool $with_css
|
||||
*/
|
||||
public static function enqueue_app_assets( string $handle = '', bool $with_css = true ) : void {
|
||||
public static function enqueue_app_assets( string $handle = '', bool $with_css = true, array $dependencies = [] ) : void {
|
||||
$dir = \EA11Y_ASSETS_PATH . 'build/';
|
||||
$url = \EA11Y_ASSETS_URL . 'build/';
|
||||
|
||||
$script_asset_path = $dir . $handle . '.asset.php';
|
||||
if ( ! file_exists( $script_asset_path ) ) {
|
||||
throw new \Error(
|
||||
|
@ -120,7 +119,7 @@ class Assets {
|
|||
wp_enqueue_script(
|
||||
$handle,
|
||||
$url . $handle . '.js',
|
||||
array_merge( $script_asset['dependencies'], [ 'wp-util', 'wp-block-editor', 'wp-components' ] ),
|
||||
array_merge( $script_asset['dependencies'], $dependencies ),
|
||||
$script_asset['version'],
|
||||
true,
|
||||
);
|
||||
|
|
|
@ -21,11 +21,11 @@ class Utils {
|
|||
/**
|
||||
* get_redirect_uri
|
||||
*
|
||||
* @param string $domain
|
||||
* @param mixed|string|null $domain
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function get_redirect_uri( string $domain = '' ) : string {
|
||||
public static function get_redirect_uri( $domain = null ) : string {
|
||||
if ( false !== strpos( Config::ADMIN_PAGE, '?page=' ) ) {
|
||||
$admin_url = admin_url( Config::ADMIN_PAGE );
|
||||
} else {
|
||||
|
@ -114,12 +114,13 @@ class Utils {
|
|||
*/
|
||||
public static function is_valid_home_url(): bool {
|
||||
static $valid = null;
|
||||
$saved = Data::get_home_url();
|
||||
|
||||
if ( null === $valid ) {
|
||||
if ( empty( Data::get_home_url() ) ) {
|
||||
if ( empty( $saved ) ) {
|
||||
$valid = true;
|
||||
} else {
|
||||
$valid = Data::get_home_url() === home_url();
|
||||
$valid = $saved === apply_filters( 'ally_connect_home_url', home_url() );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
27
modules/remediation/actions/styles.php
Normal file
27
modules/remediation/actions/styles.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace EA11y\Modules\Remediation\Actions;
|
||||
|
||||
use DOMDocument;
|
||||
use EA11y\Modules\Remediation\Classes\Remediation_Base;
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
|
||||
/**
|
||||
* Class Replace
|
||||
*/
|
||||
class Styles extends Remediation_Base {
|
||||
public static string $type = 'styles';
|
||||
|
||||
public function __construct( DOMDocument $dom, $data ) {
|
||||
parent::__construct( $dom, $data );
|
||||
|
||||
$this->use_frontend = true;
|
||||
}
|
||||
|
||||
public function run() : ?DOMDocument {
|
||||
return $this->dom;
|
||||
}
|
||||
}
|
66
modules/remediation/assets/js/actions/styles.js
Normal file
66
modules/remediation/assets/js/actions/styles.js
Normal file
|
@ -0,0 +1,66 @@
|
|||
import { RemediationBase } from './base';
|
||||
|
||||
export class StylesRemediation extends RemediationBase {
|
||||
constructor(dom, data) {
|
||||
super(dom, data);
|
||||
|
||||
this.maybeAddStyleTag();
|
||||
}
|
||||
|
||||
maybeAddStyleTag() {
|
||||
let node = this.dom.querySelector('style#ea11y-remediation-styles');
|
||||
|
||||
if (!node) {
|
||||
node = this.dom.createElement('style');
|
||||
node.id = 'ea11y-remediation-styles';
|
||||
|
||||
this.dom.body.appendChild(node);
|
||||
}
|
||||
}
|
||||
|
||||
getStyleTag() {
|
||||
return this.dom.querySelector('style#ea11y-remediation-styles');
|
||||
}
|
||||
|
||||
isValidCSS(cssText) {
|
||||
try {
|
||||
// Basic checks for common malicious patterns
|
||||
if (!cssText || typeof cssText !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for basic CSS structure and disallow dangerous patterns
|
||||
const dangerousPatterns = [
|
||||
/@import/i,
|
||||
/javascript:/i,
|
||||
/expression\s*\(/i,
|
||||
/behavior\s*:/i,
|
||||
/binding\s*:/i,
|
||||
/-moz-binding/i,
|
||||
];
|
||||
|
||||
if (dangerousPatterns.some((pattern) => pattern.test(cssText))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// More comprehensive CSS structure validation
|
||||
const cssRegex = /^[\s\S]*\{\s*[\s\S]+:\s*[\s\S]+;\s*\}[\s\S]*$/;
|
||||
return cssRegex.test(cssText.replace(/\s+/g, ' ').trim());
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
run() {
|
||||
const tag = this.getStyleTag();
|
||||
|
||||
if (!tag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.isValidCSS(this.data.rule)) {
|
||||
tag.innerText += this.data.rule;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
import { AttributeRemediation } from './actions/attribute';
|
||||
import { ElementRemediation } from './actions/element';
|
||||
import { ReplaceRemediation } from './actions/replace';
|
||||
import { StylesRemediation } from './actions/styles';
|
||||
|
||||
class RemediationRunner {
|
||||
constructor(remediations) {
|
||||
|
@ -9,8 +10,10 @@ class RemediationRunner {
|
|||
attribute: AttributeRemediation,
|
||||
element: ElementRemediation,
|
||||
replace: ReplaceRemediation,
|
||||
styles: StylesRemediation,
|
||||
};
|
||||
this.checkTimeout = null;
|
||||
|
||||
this.runAll();
|
||||
}
|
||||
|
||||
|
@ -24,6 +27,7 @@ class RemediationRunner {
|
|||
runRemediation(remediation) {
|
||||
const type = (remediation.type || '').toLowerCase();
|
||||
const Handler = this.classMap[type];
|
||||
|
||||
if (Handler) {
|
||||
try {
|
||||
return new Handler(document, remediation).run();
|
||||
|
|
|
@ -3,17 +3,36 @@
|
|||
namespace EA11y\Modules\Remediation\Classes;
|
||||
|
||||
use EA11y\Modules\Remediation\Components\Cache_Cleaner;
|
||||
use WP_Post;
|
||||
|
||||
class Utils {
|
||||
/**
|
||||
* get current page url
|
||||
*/
|
||||
public static function get_current_page_url(): ?string {
|
||||
global $post;
|
||||
if ( self::is_draft( $post ) ) {
|
||||
return self::build_draft_url( $post );
|
||||
}
|
||||
$request_uri = isset( $_SERVER['REQUEST_URI'] ) ? esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
|
||||
$path = wp_parse_url( $request_uri, PHP_URL_PATH ); // removes query string
|
||||
return rtrim( home_url( $path ), '/' );
|
||||
}
|
||||
|
||||
public static function is_draft( $post ): bool {
|
||||
return $post instanceof WP_Post && in_array( $post->post_status, [ 'draft', 'pending', 'auto-draft' ], true );
|
||||
}
|
||||
|
||||
public static function build_draft_url( $post ): string {
|
||||
$my_post = clone $post;
|
||||
$my_post->post_status = 'publish';
|
||||
$my_post->post_name = sanitize_title(
|
||||
$my_post->post_name ? $my_post->post_name : $my_post->post_title,
|
||||
$my_post->ID
|
||||
);
|
||||
return rtrim( get_permalink( $my_post ), '/' );
|
||||
}
|
||||
|
||||
|
||||
public static function get_current_page_title() {
|
||||
global $post;
|
||||
|
@ -71,7 +90,7 @@ class Utils {
|
|||
|
||||
if ( $wp_query->is_singular() ) {
|
||||
if ( $wp_query->is_single() ) {
|
||||
return get_post_type($wp_query->get_queried_object_id()) ?? 'unknown';
|
||||
return get_post_type( $wp_query->get_queried_object_id() ) ?? 'unknown';
|
||||
} elseif ( $wp_query->is_page() ) {
|
||||
return 'page';
|
||||
} elseif ( $wp_query->is_attachment() ) {
|
||||
|
|
|
@ -30,12 +30,116 @@ class Remediation_Runner {
|
|||
'ATTRIBUTE' => 'Attribute',
|
||||
'ELEMENT' => 'Element',
|
||||
'REPLACE' => 'Replace',
|
||||
'STYLES' => 'Styles',
|
||||
] );
|
||||
}
|
||||
return $classes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect AJAX requests that go through template_redirect hook
|
||||
*
|
||||
* Only detects frontend AJAX requests that would interfere with template_redirect,
|
||||
* not admin-ajax.php requests which bypass the main query cycle.
|
||||
*
|
||||
* @return bool True if a template_redirect-affecting AJAX request is detected
|
||||
*/
|
||||
private function is_template_redirect_ajax_request(): bool {
|
||||
global $wp_query;
|
||||
|
||||
// Skip admin-ajax.php requests - they don't go through template_redirect
|
||||
$request_uri = $_SERVER['REQUEST_URI'] ?? '';
|
||||
if ( strpos( $request_uri, '/wp-admin/admin-ajax.php' ) !== false ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// WooCommerce frontend AJAX (wc-ajax parameter)
|
||||
// These requests go through the main query cycle and template_redirect
|
||||
if ( ! empty( $_REQUEST['wc-ajax'] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if WP_Query has wc-ajax set (WooCommerce frontend AJAX)
|
||||
if ( is_object( $wp_query ) && $wp_query->get( 'wc-ajax' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// WooCommerce AJAX constant for frontend requests
|
||||
if ( defined( 'WC_DOING_AJAX' ) && constant( 'WC_DOING_AJAX' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// REST API requests that go through template_redirect
|
||||
if ( defined( 'REST_REQUEST' ) && constant( 'REST_REQUEST' ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check URL patterns for REST API (these go through template_redirect)
|
||||
if ( strpos( $request_uri, '/wp-json/' ) !== false ||
|
||||
strpos( $request_uri, '?rest_route=' ) !== false ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// WooCommerce Store API (frontend cart/checkout AJAX)
|
||||
if ( strpos( $request_uri, '/wc/store/' ) !== false ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Elementor frontend AJAX/preview that affects template loading
|
||||
if ( ! empty( $_REQUEST['elementor-preview'] ) ||
|
||||
! empty( $_GET['elementor-preview'] ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check for AJAX header on frontend requests (not admin)
|
||||
// Only if it's not an admin request and has AJAX header
|
||||
if ( ! is_admin() &&
|
||||
! empty( $_SERVER['HTTP_X_REQUESTED_WITH'] ) &&
|
||||
strtolower( $_SERVER['HTTP_X_REQUESTED_WITH'] ) === 'xmlhttprequest' ) {
|
||||
|
||||
// Additional check: make sure it's not a heartbeat or other admin request
|
||||
$action = $_REQUEST['action'] ?? '';
|
||||
if ( $action !== 'heartbeat' && strpos( $action, 'wp_ajax_' ) !== 0 ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Custom AJAX parameters that indicate frontend AJAX
|
||||
$frontend_ajax_params = [
|
||||
'ajax_request',
|
||||
'is_ajax',
|
||||
'doing_ajax'
|
||||
];
|
||||
|
||||
foreach ( $frontend_ajax_params as $param ) {
|
||||
if ( ! empty( $_REQUEST[ $param ] ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Query string patterns for frontend AJAX
|
||||
$query_string = $_SERVER['QUERY_STRING'] ?? '';
|
||||
$frontend_ajax_patterns = [
|
||||
'ajax=true',
|
||||
'is_ajax=1',
|
||||
'ajax_request=1'
|
||||
];
|
||||
|
||||
foreach ( $frontend_ajax_patterns as $pattern ) {
|
||||
if ( strpos( $query_string, $pattern ) !== false ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private function should_run_remediation(): bool {
|
||||
// Skip remediation during template_redirect AJAX requests
|
||||
if ( $this->is_template_redirect_ajax_request() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
$current_url = Utils::get_current_page_url();
|
||||
$this->page = new Page_Entry([
|
||||
|
|
|
@ -48,9 +48,13 @@ class Remediation_Entry extends Entry {
|
|||
*
|
||||
* @param string $by
|
||||
* @param string $by_value
|
||||
* @param string|null $group
|
||||
*/
|
||||
public static function remove( string $by, string $by_value ) {
|
||||
$where = [
|
||||
public static function remove( string $by, string $by_value, string $group = null ) {
|
||||
$where = $group ? [
|
||||
$by => $by_value,
|
||||
'group' => $group,
|
||||
] : [
|
||||
$by => $by_value,
|
||||
];
|
||||
Remediation_Table::delete( $where );
|
||||
|
@ -105,11 +109,15 @@ class Remediation_Entry extends Entry {
|
|||
* @param string $by
|
||||
* @param string $by_value
|
||||
* @param bool $status
|
||||
* @param string|null $group
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function update_remediations_status( string $by, string $by_value, bool $status ): void {
|
||||
$where = [
|
||||
public static function update_remediations_status( string $by, string $by_value, bool $status, string $group = null ): void {
|
||||
$where = $group ? [
|
||||
$by => $by_value,
|
||||
'group' => $group,
|
||||
] : [
|
||||
$by => $by_value,
|
||||
];
|
||||
|
||||
|
|
|
@ -68,8 +68,9 @@ class Items extends Route_Base {
|
|||
|
||||
$url = esc_url( $request->get_param( 'url' ) );
|
||||
$active = filter_var( $request->get_param( 'active' ), FILTER_VALIDATE_BOOLEAN );
|
||||
$group = sanitize_text_field( $request->get_param( 'group' ) );
|
||||
|
||||
Remediation_Entry::update_remediations_status( Remediation_Table::URL, $url, $active );
|
||||
Remediation_Entry::update_remediations_status( Remediation_Table::URL, $url, $active, $group );
|
||||
Page_Entry::clear_cache( $url );
|
||||
|
||||
return $this->respond_success_json( [
|
||||
|
@ -97,7 +98,8 @@ class Items extends Route_Base {
|
|||
}
|
||||
|
||||
$url = esc_url( $request->get_param( 'url' ) );
|
||||
Remediation_Entry::remove( Remediation_Table::URL, $url );
|
||||
$group = sanitize_text_field( $request->get_param( 'group' ) );
|
||||
Remediation_Entry::remove( Remediation_Table::URL, $url, $group );
|
||||
Page_Entry::clear_cache( $url );
|
||||
|
||||
return $this->respond_success_json( [
|
||||
|
|
|
@ -75,6 +75,12 @@ class Register extends Route_Base {
|
|||
$page->save();
|
||||
}
|
||||
|
||||
if ( is_wp_error( $response ) && str_contains( $response->get_error_message(), 'Quota exceeded' ) ) {
|
||||
return $this->respond_error_json( [
|
||||
'message' => 'Quota exceeded',
|
||||
] );
|
||||
}
|
||||
|
||||
if ( ! $page->exists() || is_wp_error( $response ) ) {
|
||||
return $this->respond_error_json( [
|
||||
'message' => 'Failed to register page',
|
||||
|
|
|
@ -17,7 +17,8 @@ import {
|
|||
ManualLayout,
|
||||
RemediationLayout,
|
||||
} from '@ea11y-apps/scanner/layouts';
|
||||
import { StyledPaper } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import { ColorContrastLayout } from '@ea11y-apps/scanner/layouts/color-contrast-layout';
|
||||
import { AppContainer } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import { removeExistingFocus } from '@ea11y-apps/scanner/utils/focus-on-element';
|
||||
import { useEffect } from '@wordpress/element';
|
||||
|
||||
|
@ -30,6 +31,7 @@ const App = () => {
|
|||
openedBlock,
|
||||
isManage,
|
||||
isError,
|
||||
quotaExceeded,
|
||||
loading,
|
||||
} = useScannerWizardContext();
|
||||
|
||||
|
@ -51,20 +53,20 @@ const App = () => {
|
|||
}, [showResolvedMessage]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!PAGE_QUOTA_LIMIT) {
|
||||
if (!PAGE_QUOTA_LIMIT || quotaExceeded) {
|
||||
mixpanelService.sendEvent(mixpanelEvents.upgradeSuggestionViewed, {
|
||||
current_plan: window.ea11yScannerData?.planData?.plan?.name,
|
||||
action_trigger: 'scan_triggered',
|
||||
feature_locked: 'multi-page scan',
|
||||
});
|
||||
}
|
||||
}, [PAGE_QUOTA_LIMIT]);
|
||||
}, [PAGE_QUOTA_LIMIT, quotaExceeded]);
|
||||
|
||||
const getBlock = () => {
|
||||
if (!window.ea11yScannerData?.isConnected) {
|
||||
return <NotConnectedMessage />;
|
||||
}
|
||||
if (!PAGE_QUOTA_LIMIT) {
|
||||
if (!PAGE_QUOTA_LIMIT || quotaExceeded) {
|
||||
return <QuotaMessage />;
|
||||
}
|
||||
if (isError) {
|
||||
|
@ -81,21 +83,23 @@ const App = () => {
|
|||
return <ManageMainLayout />;
|
||||
case BLOCKS.altText:
|
||||
return <AltTextLayout />;
|
||||
case BLOCKS.colorContrast:
|
||||
return <ColorContrastLayout />;
|
||||
default:
|
||||
return isManage ? <RemediationLayout /> : <ManualLayout />;
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledPaper>
|
||||
<AppContainer>
|
||||
<ErrorBoundary fallback={<ErrorMessage />}>
|
||||
<Header />
|
||||
|
||||
{showResolvedMessage ? <ResolvedMessage /> : getBlock()}
|
||||
{showResolvedMessage && !isManage ? <ResolvedMessage /> : getBlock()}
|
||||
|
||||
<Notifications message={notificationMessage} type={notificationType} />
|
||||
</ErrorBoundary>
|
||||
</StyledPaper>
|
||||
</AppContainer>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -21,11 +21,8 @@ import { ImagePreview } from '@ea11y-apps/scanner/components/alt-text-form/image
|
|||
import { UpgradeContent } from '@ea11y-apps/scanner/components/upgrade-info-tip/upgrade-content';
|
||||
import { AI_QUOTA_LIMIT, IS_AI_ENABLED } from '@ea11y-apps/scanner/constants';
|
||||
import { useAltTextForm } from '@ea11y-apps/scanner/hooks/use-alt-text-form';
|
||||
import {
|
||||
StyledBox,
|
||||
StyledLabel,
|
||||
} from '@ea11y-apps/scanner/styles/alt-text-form.styles';
|
||||
import { StyledAlert } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import { StyledLabel } from '@ea11y-apps/scanner/styles/alt-text-form.styles';
|
||||
import { StyledAlert, StyledBox } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import { scannerItem } from '@ea11y-apps/scanner/types/scanner-item';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
|
@ -35,6 +32,7 @@ export const AltTextForm = ({ items, current, setCurrent }) => {
|
|||
data,
|
||||
loadingAiText,
|
||||
isSubmitDisabled,
|
||||
loading,
|
||||
handleChange,
|
||||
handleCheck,
|
||||
handleSubmit,
|
||||
|
@ -187,6 +185,7 @@ export const AltTextForm = ({ items, current, setCurrent }) => {
|
|||
variant="contained"
|
||||
color="info"
|
||||
fullWidth
|
||||
loading={loading}
|
||||
disabled={isSubmitDisabled}
|
||||
onClick={onSubmit}
|
||||
>
|
||||
|
|
|
@ -9,15 +9,8 @@ import {
|
|||
StyledButton,
|
||||
StyledButtonContainer,
|
||||
} from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
|
||||
export const BlockButton = ({
|
||||
title,
|
||||
count,
|
||||
block,
|
||||
total,
|
||||
isManage = false,
|
||||
}) => {
|
||||
export const BlockButton = ({ title, count, block }) => {
|
||||
const { setOpenedBlock, isResolved } = useScannerWizardContext();
|
||||
|
||||
const handleClick = () => {
|
||||
|
@ -26,12 +19,11 @@ export const BlockButton = ({
|
|||
page_url: window.ea11yScannerData?.pageData?.url,
|
||||
issue_count: count,
|
||||
category_name: title,
|
||||
source: isManage ? 'remediation' : 'assistant',
|
||||
source: 'assistant',
|
||||
});
|
||||
};
|
||||
|
||||
const resolved = !isManage && (count === 0 || isResolved(block));
|
||||
const showChip = !isManage && !resolved;
|
||||
const resolved = count === 0 || isResolved(block);
|
||||
|
||||
return (
|
||||
<StyledButton
|
||||
|
@ -51,27 +43,12 @@ export const BlockButton = ({
|
|||
{title}
|
||||
</Typography>
|
||||
|
||||
{showChip && (
|
||||
{!resolved && (
|
||||
<Chip label={count} color="error" variant="standard" size="tiny" />
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{resolved && <CircleCheckFilledIcon color="success" />}
|
||||
|
||||
{isManage && (
|
||||
<Chip
|
||||
label={sprintf(
|
||||
// Translators: %1$s - active, %2$s - total
|
||||
__('%1$s/%2$s active', 'pojo-accessibility'),
|
||||
count,
|
||||
total,
|
||||
)}
|
||||
color={count > 0 ? 'info' : 'default'}
|
||||
variant="standard"
|
||||
size="tiny"
|
||||
disabled={count === 0}
|
||||
/>
|
||||
)}
|
||||
</StyledButtonContainer>
|
||||
</StyledButton>
|
||||
);
|
||||
|
@ -81,6 +58,4 @@ BlockButton.propTypes = {
|
|||
title: PropTypes.string.isRequired,
|
||||
count: PropTypes.number.isRequired,
|
||||
block: PropTypes.string.isRequired,
|
||||
total: PropTypes.number,
|
||||
isManage: PropTypes.bool,
|
||||
};
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
import Chip from '@elementor/ui/Chip';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import PropTypes from 'prop-types';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { DeleteButton } from '@ea11y-apps/scanner/components/manage-remediation-buttons/delete-button';
|
||||
import { DisableButton } from '@ea11y-apps/scanner/components/manage-remediation-buttons/disable-button';
|
||||
import { EnableButton } from '@ea11y-apps/scanner/components/manage-remediation-buttons/enable-button';
|
||||
import { BLOCKS } from '@ea11y-apps/scanner/constants';
|
||||
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
||||
import {
|
||||
ActionButton,
|
||||
ManageButtonGroup,
|
||||
ManageButtonWrap,
|
||||
} from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
|
||||
export const ManageButton = ({ title, count, block }) => {
|
||||
const { sortedRemediation, setOpenedBlock } = useScannerWizardContext();
|
||||
|
||||
const handleClick = () => {
|
||||
setOpenedBlock(block);
|
||||
mixpanelService.sendEvent(mixpanelEvents.categoryClicked, {
|
||||
page_url: window.ea11yScannerData?.pageData?.url,
|
||||
issue_count: count,
|
||||
category_name: title,
|
||||
source: 'remediation',
|
||||
});
|
||||
};
|
||||
|
||||
const total = sortedRemediation[block].length;
|
||||
const disabled = block === BLOCKS.colorContrast || block === BLOCKS.altText;
|
||||
const isAllDisabled =
|
||||
sortedRemediation[block]?.length ===
|
||||
sortedRemediation[block]?.filter(
|
||||
(remediation) => !Number(remediation.active),
|
||||
)?.length;
|
||||
|
||||
return (
|
||||
<ManageButtonWrap disabled={disabled}>
|
||||
<ActionButton
|
||||
variant="text"
|
||||
color="secondary"
|
||||
size="large"
|
||||
fullWidth
|
||||
onClick={handleClick}
|
||||
disabled={disabled}
|
||||
>
|
||||
<Typography noWrap variant="subtitle2" as="h4">
|
||||
{title}
|
||||
</Typography>
|
||||
</ActionButton>
|
||||
<Chip
|
||||
label={sprintf(
|
||||
// Translators: %1$s - active, %2$s - total
|
||||
__('%1$s/%2$s active', 'pojo-accessibility'),
|
||||
count,
|
||||
total,
|
||||
)}
|
||||
color={count > 0 ? 'info' : 'default'}
|
||||
variant="standard"
|
||||
size="tiny"
|
||||
disabled={count === 0}
|
||||
/>
|
||||
<ManageButtonGroup>
|
||||
{isAllDisabled ? (
|
||||
<EnableButton group={block} />
|
||||
) : (
|
||||
<DisableButton group={block} />
|
||||
)}
|
||||
<DeleteButton group={block} />
|
||||
</ManageButtonGroup>
|
||||
</ManageButtonWrap>
|
||||
);
|
||||
};
|
||||
|
||||
ManageButton.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
count: PropTypes.number.isRequired,
|
||||
block: PropTypes.string.isRequired,
|
||||
};
|
|
@ -0,0 +1,152 @@
|
|||
import RotateIcon from '@elementor/icons/RotateIcon';
|
||||
import Box from '@elementor/ui/Box';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import IconButton from '@elementor/ui/IconButton';
|
||||
import InputAdornment from '@elementor/ui/InputAdornment';
|
||||
import Slider from '@elementor/ui/Slider';
|
||||
import TextField from '@elementor/ui/TextField';
|
||||
import Tooltip from '@elementor/ui/Tooltip';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
import { UnstableColorPicker } from '@elementor/ui/unstable';
|
||||
import PropTypes from 'prop-types';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { SunIcon, SunOffIcon } from '@ea11y-apps/scanner/images';
|
||||
import { hexToHsl, hslToHex } from '@ea11y-apps/scanner/utils/convert-colors';
|
||||
import { useEffect, useState } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
export const ColorSet = ({ title, color, initialColor, setColor, area }) => {
|
||||
const [selectedColor, setSelectedColor] = useState(initialColor);
|
||||
const hslColor = hexToHsl(color);
|
||||
|
||||
useEffect(() => {
|
||||
setSelectedColor(initialColor);
|
||||
}, [initialColor]);
|
||||
|
||||
const sendEvent = (component, event = null) => {
|
||||
mixpanelService.sendEvent(event ?? mixpanelEvents.contrastColorChanged, {
|
||||
area,
|
||||
component,
|
||||
});
|
||||
};
|
||||
|
||||
const resetColor = () => {
|
||||
setColor(initialColor);
|
||||
sendEvent('reset', mixpanelEvents.contrastResetClicked);
|
||||
};
|
||||
|
||||
const onColorChange = (changedColor) => {
|
||||
setSelectedColor(changedColor);
|
||||
setColor(changedColor);
|
||||
sendEvent('color-picker');
|
||||
};
|
||||
|
||||
const onLightnessChange = (event, value) => {
|
||||
const raw = event?.target?.value || value;
|
||||
// Allow only digits
|
||||
if (raw && !/^\d{1,2}$|^100$/.test(raw)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const num = raw && !isNaN(raw) ? parseInt(raw, 10) : 0;
|
||||
|
||||
if (num >= 0 && num <= 100) {
|
||||
const initialHslColor = hexToHsl(selectedColor);
|
||||
const updatedColor = hslToHex({
|
||||
...initialHslColor,
|
||||
l: num,
|
||||
});
|
||||
setColor(updatedColor);
|
||||
sendEvent('slider');
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Typography variant="body2" as="p">
|
||||
{title}
|
||||
</Typography>
|
||||
<StyledColorSet>
|
||||
<SunOffIcon />
|
||||
<Slider
|
||||
aria-label={__('Lightness', 'pojo-accessibility')}
|
||||
color="secondary"
|
||||
value={hslColor.l}
|
||||
size="small"
|
||||
sx={{ width: '150px' }}
|
||||
onChange={onLightnessChange}
|
||||
/>
|
||||
<SunIcon />
|
||||
<TextField
|
||||
variant="outlined"
|
||||
size="small"
|
||||
color="secondary"
|
||||
value={hslColor.l}
|
||||
onChange={onLightnessChange}
|
||||
inputProps={{
|
||||
'aria-label': __('Lightness percent', 'pojo-accessibility'),
|
||||
}}
|
||||
InputProps={{
|
||||
sx: {
|
||||
width: '75px',
|
||||
paddingRight: '4px',
|
||||
marginRight: '8px',
|
||||
},
|
||||
endAdornment: (
|
||||
<InputAdornment position="end">
|
||||
<Button size="small" disabled sx={{ minWidth: 'auto' }}>
|
||||
%
|
||||
</Button>
|
||||
</InputAdornment>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
<UnstableColorPicker
|
||||
disableOpacity
|
||||
formats={['hex']}
|
||||
value={color}
|
||||
onChange={onColorChange}
|
||||
size="small"
|
||||
/>
|
||||
<Tooltip
|
||||
arrow
|
||||
placement="top"
|
||||
title={__('Reset', 'pojo-accessibility')}
|
||||
PopperProps={{
|
||||
disablePortal: true,
|
||||
}}
|
||||
>
|
||||
{color !== initialColor ? (
|
||||
<IconButton onClick={resetColor} size="tiny">
|
||||
<RotateIcon
|
||||
fontSize="tiny"
|
||||
sx={{ transform: 'rotate(180deg)' }}
|
||||
/>
|
||||
</IconButton>
|
||||
) : (
|
||||
<RotateIcon
|
||||
color="disabled"
|
||||
fontSize="tiny"
|
||||
sx={{ p: '6px', transform: 'rotate(180deg)' }}
|
||||
/>
|
||||
)}
|
||||
</Tooltip>
|
||||
</StyledColorSet>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
const StyledColorSet = styled(Box)`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: ${({ theme }) => theme.spacing(1)};
|
||||
`;
|
||||
|
||||
ColorSet.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
color: PropTypes.string.isRequired,
|
||||
initialColor: PropTypes.string.isRequired,
|
||||
setColor: PropTypes.func.isRequired,
|
||||
area: PropTypes.string.isRequired,
|
||||
};
|
|
@ -0,0 +1,155 @@
|
|||
import Alert from '@elementor/ui/Alert';
|
||||
import AlertTitle from '@elementor/ui/AlertTitle';
|
||||
import Box from '@elementor/ui/Box';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import Divider from '@elementor/ui/Divider';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import PropTypes from 'prop-types';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { ColorSet } from '@ea11y-apps/scanner/components/color-contrast-form/color-set';
|
||||
import { ParentSelector } from '@ea11y-apps/scanner/components/color-contrast-form/parent-selector';
|
||||
import { BLOCKS } from '@ea11y-apps/scanner/constants';
|
||||
import { useColorContrastForm } from '@ea11y-apps/scanner/hooks/use-color-contrast-form';
|
||||
import { StyledBox } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import { scannerItem } from '@ea11y-apps/scanner/types/scanner-item';
|
||||
import {
|
||||
checkContrastAA,
|
||||
isLargeText,
|
||||
} from '@ea11y-apps/scanner/utils/calc-color-ratio';
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
|
||||
export const ColorContrastForm = ({ items, current, setCurrent }) => {
|
||||
const item = items[current];
|
||||
const {
|
||||
color,
|
||||
background,
|
||||
parents,
|
||||
resolved,
|
||||
backgroundChanged,
|
||||
loading,
|
||||
changeColor,
|
||||
changeBackground,
|
||||
setParentSmaller,
|
||||
setParentLarger,
|
||||
onSubmit,
|
||||
} = useColorContrastForm({
|
||||
item,
|
||||
current,
|
||||
setCurrent,
|
||||
});
|
||||
|
||||
const isPossibleToResolve = item.messageArgs[3] && item.messageArgs[4];
|
||||
|
||||
const passRatio = isLargeText(item.node) ? '3:1' : '4.5:1';
|
||||
|
||||
const colorData =
|
||||
color && background
|
||||
? checkContrastAA(color, background, item.node)
|
||||
: {
|
||||
ratio: item.messageArgs[0],
|
||||
passesAA: false,
|
||||
};
|
||||
|
||||
const handleSubmit = async () => {
|
||||
await onSubmit();
|
||||
mixpanelService.sendEvent(mixpanelEvents.applyFixButtonClicked, {
|
||||
fix_method: 'color contrast',
|
||||
issue_type: item.message,
|
||||
current_contrast_ratio: colorData.ratio,
|
||||
background_level: parents.length,
|
||||
category_name: BLOCKS.colorContrast,
|
||||
page_url: window.ea11yScannerData?.pageData?.url,
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledBox>
|
||||
<Divider />
|
||||
{!isPossibleToResolve ? (
|
||||
<>
|
||||
<Box>
|
||||
<Typography variant="subtitle2" as="h5" sx={{ mb: 1 }}>
|
||||
{__('What’s the issue?', 'pojo-accessibility')}
|
||||
</Typography>
|
||||
<Typography variant="body2" as="p">
|
||||
{__(
|
||||
'Adjust the text or background lightness until the indicator shows an accessible level.',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography variant="subtitle2" as="h5" sx={{ mb: 1 }}>
|
||||
{__('How to resolve?', 'pojo-accessibility')}
|
||||
</Typography>
|
||||
<Typography variant="body2" as="p">
|
||||
{sprintf(
|
||||
// Translators: %s - color ratio
|
||||
__(
|
||||
'To meet accessibility standards, update the text or background color to reach a contrast ratio of at least %s',
|
||||
'pojo-accessibility',
|
||||
),
|
||||
passRatio,
|
||||
)}
|
||||
</Typography>
|
||||
</Box>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Typography variant="body2" as="p">
|
||||
{__(
|
||||
'Adjust the text or background lightness until the indicator shows an accessible level.',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</Typography>
|
||||
<ColorSet
|
||||
title={__('Text', 'pojo-accessibility')}
|
||||
color={color}
|
||||
initialColor={item.messageArgs[3]}
|
||||
setColor={changeColor}
|
||||
area="color"
|
||||
/>
|
||||
<ColorSet
|
||||
title={__('Background', 'pojo-accessibility')}
|
||||
color={background}
|
||||
initialColor={item.messageArgs[4]}
|
||||
setColor={changeBackground}
|
||||
area="background"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
{backgroundChanged && (
|
||||
<ParentSelector
|
||||
parents={parents}
|
||||
setParentSmaller={setParentSmaller}
|
||||
setParentLarger={setParentLarger}
|
||||
/>
|
||||
)}
|
||||
<Alert severity={colorData.passesAA ? 'success' : 'error'}>
|
||||
<AlertTitle sx={{ mr: 1 }}>
|
||||
{__('Contrast level:', 'pojo-accessibility')}
|
||||
</AlertTitle>
|
||||
{colorData.ratio}
|
||||
</Alert>
|
||||
{isPossibleToResolve && (
|
||||
<Button
|
||||
variant="contained"
|
||||
size="small"
|
||||
color="info"
|
||||
loading={loading}
|
||||
disabled={!colorData.passesAA || resolved || loading}
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
{__('Apply changes', 'pojo-accessibility')}
|
||||
</Button>
|
||||
)}
|
||||
</StyledBox>
|
||||
);
|
||||
};
|
||||
|
||||
ColorContrastForm.propTypes = {
|
||||
items: PropTypes.arrayOf(scannerItem).isRequired,
|
||||
current: PropTypes.number.isRequired,
|
||||
setCurrent: PropTypes.func.isRequired,
|
||||
};
|
|
@ -0,0 +1,99 @@
|
|||
import MinusIcon from '@elementor/icons/MinusIcon';
|
||||
import PlusIcon from '@elementor/icons/PlusIcon';
|
||||
import Box from '@elementor/ui/Box';
|
||||
import IconButton from '@elementor/ui/IconButton';
|
||||
import Tooltip from '@elementor/ui/Tooltip';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
import PropTypes from 'prop-types';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { COLOR_CONTRAST_SELECTORS_COUNT } from '@ea11y-apps/scanner/constants';
|
||||
import { useEffect } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
export const ParentSelector = ({
|
||||
parents,
|
||||
setParentSmaller,
|
||||
setParentLarger,
|
||||
}) => {
|
||||
useEffect(() => {
|
||||
mixpanelService.sendEvent(mixpanelEvents.backgroundAdaptorTriggered);
|
||||
}, []);
|
||||
|
||||
const selected = Math.max(0, COLOR_CONTRAST_SELECTORS_COUNT - parents.length);
|
||||
const smallerEnabled = parents.length > 1;
|
||||
const biggerEnabled = parents.length > 0 && parents.at(-1) !== '/html';
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<Typography variant="body2" as="p" sx={{ mb: 2 }}>
|
||||
{__('Background area', 'pojo-accessibility')}
|
||||
</Typography>
|
||||
<Box display="flex" alignItems="center" gap={1}>
|
||||
<Tooltip
|
||||
arrow
|
||||
placement="top"
|
||||
title={__('Apply to a smaller area', 'pojo-accessibility')}
|
||||
PopperProps={{
|
||||
disablePortal: true,
|
||||
}}
|
||||
>
|
||||
{smallerEnabled ? (
|
||||
<IconButton onClick={setParentSmaller}>
|
||||
<MinusIcon />
|
||||
</IconButton>
|
||||
) : (
|
||||
<MinusIcon color="disabled" sx={{ px: 1 }} />
|
||||
)}
|
||||
</Tooltip>
|
||||
<ParentIndicator>
|
||||
{[...Array(COLOR_CONTRAST_SELECTORS_COUNT)].map((_, i) => {
|
||||
const size = 16 + (COLOR_CONTRAST_SELECTORS_COUNT - 1 - i) * 16;
|
||||
const filled = i === selected;
|
||||
return <Square key={i} size={size} filled={filled} />;
|
||||
})}
|
||||
</ParentIndicator>
|
||||
<Tooltip
|
||||
arrow
|
||||
placement="top"
|
||||
title={__('Apply to a larger area', 'pojo-accessibility')}
|
||||
PopperProps={{
|
||||
disablePortal: true,
|
||||
}}
|
||||
>
|
||||
{biggerEnabled ? (
|
||||
<IconButton onClick={setParentLarger}>
|
||||
<PlusIcon />
|
||||
</IconButton>
|
||||
) : (
|
||||
<PlusIcon color="disabled" sx={{ px: 1 }} />
|
||||
)}
|
||||
</Tooltip>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
const ParentIndicator = styled(Box)`
|
||||
position: relative;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
`;
|
||||
|
||||
const Square = styled(Box)`
|
||||
position: absolute;
|
||||
width: ${({ size }) => size}px;
|
||||
height: ${({ size }) => size}px;
|
||||
box-sizing: border-box;
|
||||
border: ${({ filled }) => (filled ? '1px solid #000' : '1px dashed #000')};
|
||||
background-color: ${({ filled }) => (filled ? '#93C5FD' : 'transparent')};
|
||||
`;
|
||||
|
||||
ParentSelector.propTypes = {
|
||||
parents: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
setParentSmaller: PropTypes.func.isRequired,
|
||||
setParentLarger: PropTypes.func.isRequired,
|
||||
};
|
|
@ -1,63 +1,72 @@
|
|||
import ChevronLeftIcon from '@elementor/icons/ChevronLeftIcon';
|
||||
import ChevronRightIcon from '@elementor/icons/ChevronRightIcon';
|
||||
import Box from '@elementor/ui/Box';
|
||||
import Divider from '@elementor/ui/Divider';
|
||||
import IconButton from '@elementor/ui/IconButton';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
import PropTypes from 'prop-types';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { isRTL } from '@ea11y-apps/scanner/constants';
|
||||
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
||||
import { __, sprintf } from '@wordpress/i18n';
|
||||
|
||||
export const AltTextNavigation = ({ total, current, setCurrent }) => {
|
||||
export const FormNavigation = ({ total, current, setCurrent }) => {
|
||||
const { openedBlock } = useScannerWizardContext();
|
||||
const previous = current - 1;
|
||||
const next = current + 1;
|
||||
const navigate = (index, direction) => () => {
|
||||
setCurrent(index);
|
||||
mixpanelService.sendEvent(mixpanelEvents.navigationImageClicked, {
|
||||
direction,
|
||||
category: openedBlock,
|
||||
});
|
||||
};
|
||||
return (
|
||||
<StyledBox>
|
||||
<StyledNavigation>
|
||||
<StyledIconButton
|
||||
onClick={navigate(previous, 'previous')}
|
||||
disabled={current === 0}
|
||||
aria-label={__('Previous image', 'pojo-accessibility')}
|
||||
>
|
||||
<ChevronLeftIcon />
|
||||
</StyledIconButton>
|
||||
<Typography variant="body1">
|
||||
{sprintf(
|
||||
// Translators: %1$s - current, %2$s - total
|
||||
__('%1$s of %2$s issues', 'pojo-accessibility'),
|
||||
current + 1,
|
||||
total,
|
||||
)}
|
||||
</Typography>
|
||||
<StyledIconButton
|
||||
onClick={navigate(next, 'next')}
|
||||
disabled={current === total - 1}
|
||||
aria-label={__('Next image', 'pojo-accessibility')}
|
||||
>
|
||||
<ChevronRightIcon />
|
||||
</StyledIconButton>
|
||||
</StyledNavigation>
|
||||
</StyledBox>
|
||||
<Navigation>
|
||||
<Divider />
|
||||
<StyledBox>
|
||||
<StyledNavigation>
|
||||
<StyledIconButton
|
||||
onClick={navigate(previous, 'previous')}
|
||||
disabled={current === 0}
|
||||
aria-label={__('Previous', 'pojo-accessibility')}
|
||||
>
|
||||
<ChevronLeftIcon />
|
||||
</StyledIconButton>
|
||||
<Typography variant="body1">
|
||||
{sprintf(
|
||||
// Translators: %1$s - current, %2$s - total
|
||||
__('%1$s of %2$s issues', 'pojo-accessibility'),
|
||||
current + 1,
|
||||
total,
|
||||
)}
|
||||
</Typography>
|
||||
<StyledIconButton
|
||||
onClick={navigate(next, 'next')}
|
||||
disabled={current === total - 1}
|
||||
aria-label={__('Next', 'pojo-accessibility')}
|
||||
>
|
||||
<ChevronRightIcon />
|
||||
</StyledIconButton>
|
||||
</StyledNavigation>
|
||||
</StyledBox>
|
||||
</Navigation>
|
||||
);
|
||||
};
|
||||
|
||||
const StyledBox = styled(Box)`
|
||||
const Navigation = styled(Box)`
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding-block: ${({ theme }) => theme.spacing(2)};
|
||||
|
||||
`;
|
||||
const StyledBox = styled(Box)`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-block: ${({ theme }) => theme.spacing(2)};
|
||||
`;
|
||||
|
||||
const StyledNavigation = styled(Box)`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -69,7 +78,7 @@ const StyledIconButton = styled(IconButton)`
|
|||
${isRTL ? 'transform: rotate(180deg)' : ''}
|
||||
`;
|
||||
|
||||
AltTextNavigation.propTypes = {
|
||||
FormNavigation.propTypes = {
|
||||
total: PropTypes.number.isRequired,
|
||||
current: PropTypes.number.isRequired,
|
||||
setCurrent: PropTypes.func.isRequired,
|
|
@ -112,7 +112,7 @@ export const DropdownMenu = () => {
|
|||
<SettingsIcon color="disabled" />
|
||||
</MenuItemIcon>
|
||||
<DisabledMenuItemText>
|
||||
{__('Manage AI fixes', 'pojo-accessibility')}
|
||||
{__('Manage fixes', 'pojo-accessibility')}
|
||||
</DisabledMenuItemText>
|
||||
</MenuItem>
|
||||
</Tooltip>
|
||||
|
@ -127,7 +127,7 @@ export const DropdownMenu = () => {
|
|||
<SettingsIcon />
|
||||
</MenuItemIcon>
|
||||
<MenuItemText>
|
||||
{__('Manage AI fixes', 'pojo-accessibility')}
|
||||
{__('Manage fixes', 'pojo-accessibility')}
|
||||
</MenuItemText>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
|
|
@ -122,7 +122,7 @@ export const Header = () => {
|
|||
<SettingsIcon size="small" color="action" />
|
||||
|
||||
<StyledTitle variant="subtitle1" as="h2">
|
||||
{__('Manage AI fixes', 'pojo-accessibility')}
|
||||
{__('Manage fixes', 'pojo-accessibility')}
|
||||
</StyledTitle>
|
||||
</>
|
||||
) : (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { BlockButton } from '@ea11y-apps/scanner/components/block-button';
|
||||
import { ManageButton } from '@ea11y-apps/scanner/components/block-button/manage-button';
|
||||
import { BLOCK_TITLES, BLOCKS } from '@ea11y-apps/scanner/constants';
|
||||
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
||||
import { StyledBlockButtonsBox } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
|
@ -18,13 +18,11 @@ export const ManageList = () => {
|
|||
0;
|
||||
|
||||
return (
|
||||
<BlockButton
|
||||
<ManageButton
|
||||
key={key}
|
||||
title={BLOCK_TITLES[key]}
|
||||
count={resolved}
|
||||
block={BLOCKS[key]}
|
||||
total={sortedRemediation[key].length}
|
||||
isManage
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
import TrashIcon from '@elementor/icons/TrashIcon';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import IconButton from '@elementor/ui/IconButton';
|
||||
import { DeleteRemediationModal } from '@ea11y-apps/scanner/components/delete-remediation-modal';
|
||||
import { useManageActions } from '@ea11y-apps/scanner/hooks/use-manage-actions';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
export const DeleteButton = ({ group }) => {
|
||||
const { deleteAllRemediationForPage } = useManageActions();
|
||||
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
||||
|
||||
const toggleDeleteModal = () => setShowDeleteModal(!showDeleteModal);
|
||||
|
||||
const onDeleteRemediation = async () => {
|
||||
setShowDeleteModal(false);
|
||||
await deleteAllRemediationForPage(group);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{group ? (
|
||||
<IconButton
|
||||
size="tiny"
|
||||
color="error"
|
||||
aria-label={__('Remove all remediations', 'pojo-accessibility')}
|
||||
onClick={toggleDeleteModal}
|
||||
>
|
||||
<TrashIcon fontSize="tiny" />
|
||||
</IconButton>
|
||||
) : (
|
||||
<Button
|
||||
startIcon={<TrashIcon />}
|
||||
size="small"
|
||||
color="error"
|
||||
variant="text"
|
||||
onClick={toggleDeleteModal}
|
||||
>
|
||||
{__('Remove all', 'pojo-accessibility')}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<DeleteRemediationModal
|
||||
open={showDeleteModal}
|
||||
hideConfirmation={toggleDeleteModal}
|
||||
onDelete={onDeleteRemediation}
|
||||
isMain
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
import BanIcon from '@elementor/icons/BanIcon';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import IconButton from '@elementor/ui/IconButton';
|
||||
import { useManageActions } from '@ea11y-apps/scanner/hooks/use-manage-actions';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
export const DisableButton = ({ group }) => {
|
||||
const { updateAllRemediationForPage } = useManageActions();
|
||||
return group ? (
|
||||
<IconButton
|
||||
size="tiny"
|
||||
color="secondary"
|
||||
aria-label={__('Disable all remediations', 'pojo-accessibility')}
|
||||
onClick={updateAllRemediationForPage(false, group)}
|
||||
>
|
||||
<BanIcon fontSize="tiny" />
|
||||
</IconButton>
|
||||
) : (
|
||||
<Button
|
||||
startIcon={<BanIcon />}
|
||||
size="small"
|
||||
color="secondary"
|
||||
variant="text"
|
||||
onClick={updateAllRemediationForPage(false)}
|
||||
>
|
||||
{__('Disable all', 'pojo-accessibility')}
|
||||
</Button>
|
||||
);
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
import ReloadIcon from '@elementor/icons/ReloadIcon';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import IconButton from '@elementor/ui/IconButton';
|
||||
import { useManageActions } from '@ea11y-apps/scanner/hooks/use-manage-actions';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
export const EnableButton = ({ group }) => {
|
||||
const { updateAllRemediationForPage } = useManageActions();
|
||||
return group ? (
|
||||
<IconButton
|
||||
size="tiny"
|
||||
color="info"
|
||||
aria-label={__('Enable all remediations', 'pojo-accessibility')}
|
||||
onClick={updateAllRemediationForPage(true, group)}
|
||||
>
|
||||
<ReloadIcon fontSize="tiny" />
|
||||
</IconButton>
|
||||
) : (
|
||||
<Button
|
||||
startIcon={<ReloadIcon />}
|
||||
size="small"
|
||||
color="info"
|
||||
variant="text"
|
||||
onClick={updateAllRemediationForPage(true)}
|
||||
>
|
||||
{__('Enable all', 'pojo-accessibility')}
|
||||
</Button>
|
||||
);
|
||||
};
|
|
@ -1,71 +1,22 @@
|
|||
import BanIcon from '@elementor/icons/BanIcon';
|
||||
import ReloadIcon from '@elementor/icons/ReloadIcon';
|
||||
import TrashIcon from '@elementor/icons/TrashIcon';
|
||||
import Box from '@elementor/ui/Box';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import Divider from '@elementor/ui/Divider';
|
||||
import IconButton from '@elementor/ui/IconButton';
|
||||
import { DeleteRemediationModal } from '@ea11y-apps/scanner/components/delete-remediation-modal';
|
||||
import { DeleteButton } from '@ea11y-apps/scanner/components/manage-remediation-buttons/delete-button';
|
||||
import { DisableButton } from '@ea11y-apps/scanner/components/manage-remediation-buttons/disable-button';
|
||||
import { EnableButton } from '@ea11y-apps/scanner/components/manage-remediation-buttons/enable-button';
|
||||
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
||||
import { useManageActions } from '@ea11y-apps/scanner/hooks/use-manage-actions';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
export const ManageRemediationButtons = () => {
|
||||
const { remediations } = useScannerWizardContext();
|
||||
const { updateAllRemediationForPage, deleteAllRemediationForPage } =
|
||||
useManageActions();
|
||||
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
||||
|
||||
const isAllDisabled =
|
||||
remediations?.length ===
|
||||
remediations?.filter((remediation) => !Number(remediation.active))?.length;
|
||||
|
||||
const toggleDeleteModal = () => setShowDeleteModal(!showDeleteModal);
|
||||
|
||||
const onDeleteRemediation = async () => {
|
||||
setShowDeleteModal(false);
|
||||
await deleteAllRemediationForPage();
|
||||
};
|
||||
|
||||
return (
|
||||
<Box display="flex" gap={1}>
|
||||
<IconButton
|
||||
size="tiny"
|
||||
color="error"
|
||||
aria-label={__('Remove all remediations', 'pojo-accessibility')}
|
||||
onClick={toggleDeleteModal}
|
||||
>
|
||||
<TrashIcon fontSize="tiny" />
|
||||
</IconButton>
|
||||
{isAllDisabled ? <EnableButton /> : <DisableButton />}
|
||||
<Divider orientation="vertical" flexItem sx={{ my: 0.5 }} />
|
||||
{isAllDisabled ? (
|
||||
<Button
|
||||
startIcon={<ReloadIcon />}
|
||||
size="small"
|
||||
color="info"
|
||||
variant="text"
|
||||
onClick={updateAllRemediationForPage(true)}
|
||||
>
|
||||
{__('Enable all', 'pojo-accessibility')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
startIcon={<BanIcon />}
|
||||
size="small"
|
||||
color="secondary"
|
||||
variant="text"
|
||||
onClick={updateAllRemediationForPage(false)}
|
||||
>
|
||||
{__('Disable all', 'pojo-accessibility')}
|
||||
</Button>
|
||||
)}
|
||||
<DeleteRemediationModal
|
||||
open={showDeleteModal}
|
||||
hideConfirmation={toggleDeleteModal}
|
||||
onDelete={onDeleteRemediation}
|
||||
isMain
|
||||
/>
|
||||
<DeleteButton />
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -71,6 +71,7 @@ export const ResolveWithAi = ({ item, current }) => {
|
|||
rule_id: item.ruleId,
|
||||
wcag_level: item.reasonCategory.match(/\((AAA?|AA?|A)\)/)?.[1] || '',
|
||||
category_name: openedBlock,
|
||||
page_url: window.ea11yScannerData?.pageData?.url,
|
||||
// ai_text_response: text,
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -40,15 +40,16 @@ export const ResolvedMessage = () => {
|
|||
</Typography>
|
||||
|
||||
<ResolvedButtonsBox>
|
||||
<Button
|
||||
size="small"
|
||||
variant="outlined"
|
||||
color="secondary"
|
||||
onClick={showIssues}
|
||||
disabled={!remediations?.length}
|
||||
>
|
||||
{__('Review fixes', 'pojo-accessibility')}
|
||||
</Button>
|
||||
{remediations?.length > 0 && (
|
||||
<Button
|
||||
size="small"
|
||||
variant="outlined"
|
||||
color="secondary"
|
||||
onClick={showIssues}
|
||||
>
|
||||
{__('Review fixes', 'pojo-accessibility')}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<Button
|
||||
href={window?.ea11yScannerData?.dashboardUrl}
|
||||
|
|
|
@ -7,6 +7,11 @@ export const MANAGE_URL_PARAM = 'open-ea11y-manage';
|
|||
export const ROOT_ID = 'ea11y-scanner-wizard-widget';
|
||||
|
||||
export const CURRENT_ELEMENT_CLASS = 'ea11y-scanner-current-element';
|
||||
export const COLOR_ELEMENT_CLASS = 'ea11y-scanner-color-element';
|
||||
export const BACKGROUND_ELEMENT_CLASS = 'ea11y-scanner-background-element';
|
||||
export const COLOR_CONTRAST_SELECTORS_COUNT = 5;
|
||||
export const DATA_INITIAL_BG = 'data-initial-bg';
|
||||
export const DATA_INITIAL_COLOR = 'data-initial-color';
|
||||
|
||||
export const UPGRADE_URL = 'https://go.elementor.com/acc-free-no-AI-scanner';
|
||||
export const COMPARE_PLAN_URL = 'https://go.elementor.com/acc-AI-limit-scanner';
|
||||
|
@ -28,7 +33,7 @@ export const PAGE_PER_PLAN =
|
|||
export const PAGE_QUOTA_LIMIT =
|
||||
window.ea11yScannerData?.planData?.scannedPages?.allowed -
|
||||
window.ea11yScannerData?.planData?.scannedPages?.used >
|
||||
0;
|
||||
0 || !window?.ea11yScannerData?.pageData?.unregistered;
|
||||
|
||||
export const BLOCKS = {
|
||||
main: 'main',
|
||||
|
@ -63,7 +68,7 @@ export const BLOCK_TITLES = {
|
|||
),
|
||||
pageStructureNav: __('Page Structure & Navigation', 'pojo-accessibility'),
|
||||
tables: __('Tables', 'pojo-accessibility'),
|
||||
colorContrast: __('Color Contrast & Style', 'pojo-accessibility'),
|
||||
colorContrast: __('Color contrast', 'pojo-accessibility'),
|
||||
other: __('Other Accessibility Issues', 'pojo-accessibility'),
|
||||
};
|
||||
|
||||
|
@ -93,7 +98,7 @@ export const BLOCK_INFO = {
|
|||
'pojo-accessibility',
|
||||
),
|
||||
colorContrast: __(
|
||||
'Choose colors with strong contrast to ensure your text is readable for everyone.',
|
||||
'Text and background lightness can hinder readability. Depending on text size, you may need to adjust the contrast level to improve accessibility.',
|
||||
'pojo-accessibility',
|
||||
),
|
||||
other: __(
|
||||
|
|
|
@ -31,6 +31,7 @@ export const ScannerWizardContext = createContext({
|
|||
openedBlock: '',
|
||||
loading: null,
|
||||
isError: false,
|
||||
quotaExceeded: false,
|
||||
isManage: false,
|
||||
isChanged: false,
|
||||
sortedViolations: INITIAL_SORTED_VIOLATIONS,
|
||||
|
@ -71,6 +72,7 @@ export const ScannerWizardContextProvider = ({ children }) => {
|
|||
const [openedBlock, setOpenedBlock] = useState(BLOCKS.main);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [isError, setIsError] = useState(false);
|
||||
const [quotaExceeded, setQuotaExceeded] = useState(false);
|
||||
const [isManage, setIsManage] = useState(false);
|
||||
const [isManageChanged, setIsManageChanged] = useState(false);
|
||||
const [altTextData, setAltTextData] = useState([]);
|
||||
|
@ -117,13 +119,9 @@ export const ScannerWizardContextProvider = ({ children }) => {
|
|||
window.ea11yScannerData?.pageData?.url,
|
||||
);
|
||||
|
||||
const filteredRemediations = items.data.filter(
|
||||
(remediation) => remediation.group !== BLOCKS.altText,
|
||||
);
|
||||
const sorted = sortRemediation(items.data);
|
||||
|
||||
const sorted = sortRemediation(filteredRemediations);
|
||||
|
||||
setRemediations(filteredRemediations);
|
||||
setRemediations(items.data);
|
||||
setSortedRemediation(sorted);
|
||||
} catch (error) {
|
||||
setIsError(true);
|
||||
|
@ -151,7 +149,7 @@ export const ScannerWizardContextProvider = ({ children }) => {
|
|||
window.ea11yScannerData.initialScanResult?.counts?.violation ?? 0;
|
||||
const violation =
|
||||
results?.summary?.counts?.violation >= 0
|
||||
? Math.max(initialViolations, results?.summary?.counts?.violation)
|
||||
? results?.summary?.counts?.violation
|
||||
: null;
|
||||
|
||||
const registerPage = async (data, sorted) => {
|
||||
|
@ -172,6 +170,9 @@ export const ScannerWizardContextProvider = ({ children }) => {
|
|||
: 0,
|
||||
);
|
||||
} catch (e) {
|
||||
if (e?.message === 'Quota exceeded') {
|
||||
setQuotaExceeded(true);
|
||||
}
|
||||
setIsError(true);
|
||||
}
|
||||
};
|
||||
|
@ -201,7 +202,10 @@ export const ScannerWizardContextProvider = ({ children }) => {
|
|||
const url = new URL(window.location.href);
|
||||
const data = await window.ace.check(document);
|
||||
const filtered = data.results.filter(
|
||||
(item) => item.level === 'violation',
|
||||
(item) =>
|
||||
item.level === 'violation' ||
|
||||
(item.ruleId === 'text_contrast_sufficient' &&
|
||||
item.level === 'potentialViolation'),
|
||||
);
|
||||
const sorted = sortViolations(filtered);
|
||||
|
||||
|
@ -299,6 +303,7 @@ export const ScannerWizardContextProvider = ({ children }) => {
|
|||
openedBlock,
|
||||
loading,
|
||||
isError,
|
||||
quotaExceeded,
|
||||
isManage,
|
||||
isChanged,
|
||||
sortedViolations,
|
||||
|
|
|
@ -23,16 +23,19 @@ export const useAltTextForm = ({ current, item }) => {
|
|||
setResolved,
|
||||
isResolved,
|
||||
setOpenedBlock,
|
||||
updateRemediationList,
|
||||
} = useScannerWizardContext();
|
||||
const { error } = useToastNotification();
|
||||
|
||||
const [loadingAiText, setLoadingAiText] = useState(false);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [firstOpen, setFirstOpen] = useState(true);
|
||||
|
||||
const isSubmitDisabled =
|
||||
(!altTextData?.[current]?.makeDecorative &&
|
||||
!altTextData?.[current]?.altText) ||
|
||||
altTextData?.[current]?.resolved;
|
||||
altTextData?.[current]?.resolved ||
|
||||
loading;
|
||||
|
||||
useEffect(() => {
|
||||
if (!firstOpen && isResolved(BLOCKS.altText)) {
|
||||
|
@ -102,6 +105,7 @@ export const useAltTextForm = ({ current, item }) => {
|
|||
});
|
||||
|
||||
await APIScanner.resolveIssue(currentScanId);
|
||||
void updateRemediationList();
|
||||
} catch (e) {
|
||||
console.warn(e);
|
||||
}
|
||||
|
@ -129,30 +133,38 @@ export const useAltTextForm = ({ current, item }) => {
|
|||
};
|
||||
|
||||
const handleSubmit = async () => {
|
||||
const fixMethod = altTextData?.[current]?.apiId
|
||||
? 'AI alt-text'
|
||||
: 'Manual alt-text';
|
||||
await updateAltText(item);
|
||||
if (!altTextData?.[current]?.resolved) {
|
||||
updateData({ resolved: true });
|
||||
setResolved(resolved + 1);
|
||||
}
|
||||
try {
|
||||
setLoading(true);
|
||||
const fixMethod = altTextData?.[current]?.apiId
|
||||
? 'AI alt-text'
|
||||
: 'Manual alt-text';
|
||||
await updateAltText(item);
|
||||
if (!altTextData?.[current]?.resolved) {
|
||||
updateData({ resolved: true });
|
||||
setResolved(resolved + 1);
|
||||
}
|
||||
|
||||
if (altTextData?.[current]?.apiId) {
|
||||
mixpanelService.sendEvent(mixpanelEvents.aiSuggestionAccepted, {
|
||||
element_selector: item.path.dom,
|
||||
image_src: item.node?.src,
|
||||
final_text: altTextData?.[current]?.altText,
|
||||
credit_used: 1,
|
||||
if (altTextData?.[current]?.apiId) {
|
||||
mixpanelService.sendEvent(mixpanelEvents.aiSuggestionAccepted, {
|
||||
element_selector: item.path.dom,
|
||||
image_src: item.node?.src,
|
||||
final_text: altTextData?.[current]?.altText,
|
||||
credit_used: 1,
|
||||
});
|
||||
}
|
||||
mixpanelService.sendEvent(mixpanelEvents.applyFixButtonClicked, {
|
||||
fix_method: altTextData?.[current]?.makeDecorative
|
||||
? 'Mark as decorative'
|
||||
: fixMethod,
|
||||
issue_type: item.message,
|
||||
category_name: BLOCKS.altText,
|
||||
page_url: window.ea11yScannerData?.pageData?.url,
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
mixpanelService.sendEvent(mixpanelEvents.applyFixButtonClicked, {
|
||||
fix_method: altTextData?.[current]?.makeDecorative
|
||||
? 'Mark as decorative'
|
||||
: fixMethod,
|
||||
issue_type: item.message,
|
||||
category_name: BLOCKS.altText,
|
||||
});
|
||||
};
|
||||
|
||||
const getPayload = async () => {
|
||||
|
@ -171,6 +183,7 @@ export const useAltTextForm = ({ current, item }) => {
|
|||
wcag_level: item.reasonCategory.match(/\((AAA?|AA?|A)\)/)?.[1] || '',
|
||||
category_name: BLOCKS.altText,
|
||||
ai_text_response: text,
|
||||
page_url: window.ea11yScannerData?.pageData?.url,
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -222,6 +235,7 @@ export const useAltTextForm = ({ current, item }) => {
|
|||
loadingAiText,
|
||||
data: altTextData,
|
||||
isSubmitDisabled,
|
||||
loading,
|
||||
handleCheck,
|
||||
handleChange,
|
||||
handleSubmit,
|
||||
|
|
285
modules/scanner/assets/js/hooks/use-color-contrast-form.js
Normal file
285
modules/scanner/assets/js/hooks/use-color-contrast-form.js
Normal file
|
@ -0,0 +1,285 @@
|
|||
import getXPath from 'get-xpath';
|
||||
import PropTypes from 'prop-types';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { APIScanner } from '@ea11y-apps/scanner/api/APIScanner';
|
||||
import {
|
||||
BACKGROUND_ELEMENT_CLASS,
|
||||
BLOCKS,
|
||||
DATA_INITIAL_BG,
|
||||
DATA_INITIAL_COLOR,
|
||||
} from '@ea11y-apps/scanner/constants';
|
||||
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
||||
import { scannerItem } from '@ea11y-apps/scanner/types/scanner-item';
|
||||
import {
|
||||
focusOnElement,
|
||||
removeExistingFocus,
|
||||
} from '@ea11y-apps/scanner/utils/focus-on-element';
|
||||
import { getElementByXPath } from '@ea11y-apps/scanner/utils/get-element-by-xpath';
|
||||
import { getElementCSSSelector } from '@ea11y-apps/scanner/utils/get-element-css-selector';
|
||||
import { useEffect, useState } from '@wordpress/element';
|
||||
|
||||
export const useColorContrastForm = ({ item, current, setCurrent }) => {
|
||||
const {
|
||||
openedBlock,
|
||||
manualData,
|
||||
resolved: resolvedBlock,
|
||||
setResolved,
|
||||
isResolved,
|
||||
setOpenedBlock,
|
||||
setManualData,
|
||||
updateRemediationList,
|
||||
} = useScannerWizardContext();
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [firstOpen, setFirstOpen] = useState(true);
|
||||
|
||||
const updateData = (data) => {
|
||||
const existing = manualData[openedBlock]?.[current] || {};
|
||||
const updated = [...(manualData[openedBlock] || [])];
|
||||
updated[current] = { ...existing, ...data };
|
||||
|
||||
setManualData({
|
||||
...manualData,
|
||||
[openedBlock]: updated,
|
||||
});
|
||||
};
|
||||
|
||||
const sendEvent = (method) => {
|
||||
mixpanelService.sendEvent(mixpanelEvents.backgroundAdaptorChanged, {
|
||||
method,
|
||||
});
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!firstOpen && isResolved(BLOCKS.colorContrast)) {
|
||||
removeExistingFocus();
|
||||
setOpenedBlock(BLOCKS.main);
|
||||
}
|
||||
setFirstOpen(false);
|
||||
}, [manualData]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!item?.node?.getAttribute(DATA_INITIAL_COLOR)) {
|
||||
const initialColor =
|
||||
manualData[openedBlock]?.[current]?.color || item.messageArgs[3];
|
||||
item.node.setAttribute(DATA_INITIAL_COLOR, initialColor);
|
||||
item.node.style.setProperty('color', initialColor, 'important');
|
||||
}
|
||||
}, [item]);
|
||||
|
||||
const {
|
||||
color = item.messageArgs[3],
|
||||
background = item.messageArgs[4],
|
||||
parents = [item.path.dom],
|
||||
resolved = false,
|
||||
backgroundChanged = false,
|
||||
} = manualData[openedBlock]?.[current] || {};
|
||||
|
||||
const changeColor = (updColor) => {
|
||||
item.node?.style?.setProperty('color', updColor, 'important');
|
||||
updateData({ color: updColor, resolved: false });
|
||||
};
|
||||
|
||||
const changeBackground = (updBackground) => {
|
||||
const element = getElementByXPath(parents.at(-1));
|
||||
if (!element) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!element.getAttribute(DATA_INITIAL_BG)) {
|
||||
const initial = window
|
||||
.getComputedStyle(element)
|
||||
.getPropertyValue('background-color');
|
||||
element.setAttribute(DATA_INITIAL_BG, initial);
|
||||
}
|
||||
|
||||
element.style?.setProperty('background-color', updBackground, 'important');
|
||||
updateData({
|
||||
background: updBackground,
|
||||
resolved: false,
|
||||
backgroundChanged: true,
|
||||
});
|
||||
};
|
||||
|
||||
const setParentBackground = (nextElement, element) => {
|
||||
if (!nextElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!nextElement.getAttribute(DATA_INITIAL_BG)) {
|
||||
const initial = window
|
||||
.getComputedStyle(nextElement)
|
||||
.getPropertyValue('background-color');
|
||||
nextElement.setAttribute(DATA_INITIAL_BG, initial);
|
||||
}
|
||||
|
||||
element?.style?.setProperty(
|
||||
'background-color',
|
||||
element?.getAttribute(DATA_INITIAL_BG),
|
||||
'important',
|
||||
);
|
||||
|
||||
nextElement.style?.setProperty('background-color', background, 'important');
|
||||
};
|
||||
|
||||
const setParentLarger = () => {
|
||||
const element = getElementByXPath(parents.at(-1));
|
||||
const parent = element?.parentElement;
|
||||
if (!element || !parent) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const xpath = getXPath(parent, { ignoreId: true });
|
||||
focusOnElement(parent, BACKGROUND_ELEMENT_CLASS);
|
||||
setParentBackground(parent, element);
|
||||
|
||||
updateData({
|
||||
parents: [...parents, xpath],
|
||||
resolved: false,
|
||||
});
|
||||
sendEvent('plus');
|
||||
} catch (error) {
|
||||
console.warn('Failed to get XPath for parent element:', error);
|
||||
}
|
||||
};
|
||||
|
||||
const setParentSmaller = () => {
|
||||
const newParents = parents.slice(0, -1);
|
||||
const nextElement = getElementByXPath(newParents.at(-1));
|
||||
if (parents.length <= 1 || !nextElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (newParents.length > 1) {
|
||||
focusOnElement(nextElement, BACKGROUND_ELEMENT_CLASS);
|
||||
} else {
|
||||
removeExistingFocus(BACKGROUND_ELEMENT_CLASS);
|
||||
}
|
||||
|
||||
setParentBackground(nextElement);
|
||||
updateData({ parents: newParents, resolved: false });
|
||||
sendEvent('minus');
|
||||
};
|
||||
|
||||
const isValidHexColor = (str) =>
|
||||
/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(str.trim());
|
||||
|
||||
const isValidCSS = (cssText) => {
|
||||
try {
|
||||
// Basic checks for common malicious patterns
|
||||
if (!cssText || typeof cssText !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for basic CSS structure and disallow dangerous patterns
|
||||
const dangerousPatterns = [
|
||||
/@import/i,
|
||||
/javascript:/i,
|
||||
/expression\s*\(/i,
|
||||
/behavior\s*:/i,
|
||||
/binding\s*:/i,
|
||||
/-moz-binding/i,
|
||||
];
|
||||
|
||||
if (dangerousPatterns.some((pattern) => pattern.test(cssText))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// More comprehensive CSS structure validation
|
||||
const cssRegex = /^[\s\S]*\{\s*[\s\S]+:\s*[\s\S]+;\s*\}[\s\S]*$/;
|
||||
const hasBasicStructure = cssRegex.test(
|
||||
cssText.replace(/\s+/g, ' ').trim(),
|
||||
);
|
||||
|
||||
// Additional validation: check for balanced braces
|
||||
const openBraces = (cssText.match(/\{/g) || []).length;
|
||||
const closeBraces = (cssText.match(/\}/g) || []).length;
|
||||
|
||||
return hasBasicStructure && openBraces === closeBraces && openBraces > 0;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
const buildCSSRule = () => {
|
||||
if (!isValidHexColor(color) || !isValidHexColor(background)) {
|
||||
throw new Error('Invalid hex color input detected');
|
||||
}
|
||||
try {
|
||||
const colorSelector = getElementCSSSelector(item.path.dom);
|
||||
const bgSelector = getElementCSSSelector(
|
||||
parents.length > 0 ? parents.at(-1) : item.path.dom,
|
||||
);
|
||||
|
||||
const colorRule =
|
||||
color !== item.messageArgs[3]
|
||||
? `${colorSelector} {color: ${color} !important;}`
|
||||
: '';
|
||||
const bgRule =
|
||||
background !== item.messageArgs[4]
|
||||
? `${bgSelector} {background-color: ${background} !important;}`
|
||||
: '';
|
||||
|
||||
const css = `${colorRule}${bgRule}`;
|
||||
|
||||
return isValidCSS(css) ? css : '';
|
||||
} catch (e) {
|
||||
console.warn('Failed to convert XPath to CSS selector', e);
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
const onSubmit = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
await APIScanner.submitRemediation({
|
||||
url: window?.ea11yScannerData?.pageData?.url,
|
||||
remediation: {
|
||||
rule: buildCSSRule(),
|
||||
category: item.reasonCategory.match(/\((AAA?|AA?|A)\)/)?.[1] || '',
|
||||
type: 'STYLES',
|
||||
xpath: item.path.dom,
|
||||
},
|
||||
rule: item.ruleId,
|
||||
group: BLOCKS.colorContrast,
|
||||
});
|
||||
|
||||
updateData({ resolved: true });
|
||||
|
||||
item.node?.removeAttribute(DATA_INITIAL_COLOR);
|
||||
getElementByXPath(
|
||||
parents.length > 0 ? parents.at(-1) : item.path.dom,
|
||||
)?.removeAttribute(DATA_INITIAL_BG);
|
||||
|
||||
removeExistingFocus();
|
||||
setCurrent(current + 1);
|
||||
setResolved(resolvedBlock + 1);
|
||||
void updateRemediationList();
|
||||
} catch (error) {
|
||||
console.error('Failed to submit remediation:', error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
color,
|
||||
background,
|
||||
parents,
|
||||
resolved,
|
||||
backgroundChanged,
|
||||
loading,
|
||||
changeColor,
|
||||
changeBackground,
|
||||
setParentLarger,
|
||||
setParentSmaller,
|
||||
onSubmit,
|
||||
};
|
||||
};
|
||||
|
||||
useColorContrastForm.propTypes = {
|
||||
item: scannerItem.isRequired,
|
||||
current: PropTypes.number.isRequired,
|
||||
setCurrent: PropTypes.func.isRequired,
|
||||
};
|
|
@ -19,12 +19,13 @@ export const useManageActions = (current = null) => {
|
|||
|
||||
const [activeRequest, setActiveRequest] = useState(false);
|
||||
|
||||
const updateAllRemediationForPage = (active) => async () => {
|
||||
const updateAllRemediationForPage = (active, group) => async () => {
|
||||
try {
|
||||
setLoading(true);
|
||||
await APIScanner.updateRemediationStatusForPage({
|
||||
url: window?.ea11yScannerData?.pageData?.url,
|
||||
active,
|
||||
group,
|
||||
});
|
||||
setIsManageChanged(true);
|
||||
await updateRemediationList();
|
||||
|
@ -32,7 +33,10 @@ export const useManageActions = (current = null) => {
|
|||
mixpanelEvents[active ? 'remediationEnabled' : 'remediationDisabled'],
|
||||
{
|
||||
action_type: active ? 'enable_all' : 'disable_all',
|
||||
remediations_amount: remediations?.length,
|
||||
remediations_amount: group
|
||||
? sortedRemediation[group]
|
||||
: remediations?.length,
|
||||
category: group || 'all',
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
|
@ -43,24 +47,32 @@ export const useManageActions = (current = null) => {
|
|||
}
|
||||
};
|
||||
|
||||
const deleteAllRemediationForPage = async () => {
|
||||
const deleteAllRemediationForPage = async (group) => {
|
||||
try {
|
||||
setLoading(true);
|
||||
await APIScanner.deleteRemediationForPage({
|
||||
url: window?.ea11yScannerData?.pageData?.url,
|
||||
group,
|
||||
});
|
||||
|
||||
await mixpanelService.sendEvent(mixpanelEvents.remediationRemoved, {
|
||||
action_type: 'remove_all',
|
||||
remediations_amount: remediations?.length,
|
||||
remediations_amount: group
|
||||
? sortedRemediation[group]
|
||||
: remediations?.length,
|
||||
category: group || 'all',
|
||||
});
|
||||
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.delete('open-ea11y-assistant');
|
||||
url.searchParams.delete('open-ea11y-assistant-src');
|
||||
url.searchParams.append('open-ea11y-assistant', '1');
|
||||
if (group) {
|
||||
await updateRemediationList();
|
||||
} else {
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.delete('open-ea11y-assistant');
|
||||
url.searchParams.delete('open-ea11y-assistant-src');
|
||||
url.searchParams.append('open-ea11y-assistant', '1');
|
||||
|
||||
window.location.assign(url);
|
||||
window.location.assign(url);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
error(__('An error occurred.', 'pojo-accessibility'));
|
||||
|
|
|
@ -104,6 +104,7 @@ export const useManualFixForm = ({ item, current }) => {
|
|||
snippet_content: replace,
|
||||
category_name: openedBlock,
|
||||
source: 'assistant',
|
||||
page_url: window.ea11yScannerData?.pageData?.url,
|
||||
});
|
||||
|
||||
void updateRemediationList();
|
||||
|
|
|
@ -2,3 +2,5 @@ export { Logo } from './logo';
|
|||
export { ResolvedImage } from './resolved-image';
|
||||
export { ErrorImage } from './error-image';
|
||||
export { NotConnectedImage } from './not-connected-image';
|
||||
export { SunIcon } from './sun-icon';
|
||||
export { SunOffIcon } from './sun-off-icon';
|
||||
|
|
20
modules/scanner/assets/js/images/sun-icon.js
Normal file
20
modules/scanner/assets/js/images/sun-icon.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
export const SunIcon = () => {
|
||||
return (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
role="presentation"
|
||||
>
|
||||
<path
|
||||
d="M2.5 10H3.33333M10 2.5V3.33333M16.6667 10H17.5M10 16.6667V17.5M4.66667 4.66667L5.25 5.25M15.3333 4.66667L14.75 5.25M14.75 14.75L15.3333 15.3333M5.25 14.75L4.66667 15.3333M13.3333 10C13.3333 11.8409 11.8409 13.3333 10 13.3333C8.15905 13.3333 6.66667 11.8409 6.66667 10C6.66667 8.15905 8.15905 6.66667 10 6.66667C11.8409 6.66667 13.3333 8.15905 13.3333 10Z"
|
||||
stroke="black"
|
||||
strokeOpacity="0.54"
|
||||
strokeWidth="1.5"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
20
modules/scanner/assets/js/images/sun-off-icon.js
Normal file
20
modules/scanner/assets/js/images/sun-off-icon.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
export const SunOffIcon = () => {
|
||||
return (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
role="presentation"
|
||||
>
|
||||
<path
|
||||
d="M2.5 2.5L17.5 17.5M13.3333 10C13.3333 9.11594 12.9822 8.2681 12.357 7.64298C11.7319 7.01786 10.8841 6.66667 10 6.66667M7.63835 7.6475C7.01354 8.27297 6.66279 9.12102 6.66326 10.0051C6.66373 10.8892 7.01538 11.7369 7.64084 12.3617C8.26631 12.9865 9.11437 13.3372 9.99845 13.3368C10.8825 13.3363 11.7302 12.9846 12.355 12.3592M2.5 10H3.33333M10 2.5V3.33333M16.6667 10H17.5M10 16.6667V17.5M4.66667 4.66667L5.25 5.25M15.3333 4.66667L14.75 5.25M14.75 14.75L15.3333 15.3333M5.25 14.75L4.66667 15.3333"
|
||||
stroke="black"
|
||||
strokeOpacity="0.54"
|
||||
strokeWidth="1.5"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
);
|
||||
};
|
|
@ -1,6 +1,6 @@
|
|||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { AltTextForm } from '@ea11y-apps/scanner/components/alt-text-form';
|
||||
import { AltTextNavigation } from '@ea11y-apps/scanner/components/alt-text-navigation';
|
||||
import { FormNavigation } from '@ea11y-apps/scanner/components/form-navigation';
|
||||
import { BLOCKS } from '@ea11y-apps/scanner/constants';
|
||||
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
||||
import { StyledContent } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
|
@ -47,7 +47,7 @@ export const AltTextLayout = () => {
|
|||
current={current}
|
||||
setCurrent={changeNavigation}
|
||||
/>
|
||||
<AltTextNavigation
|
||||
<FormNavigation
|
||||
total={sortedViolations.altText.length}
|
||||
current={current}
|
||||
setCurrent={changeNavigation}
|
||||
|
|
64
modules/scanner/assets/js/layouts/color-contrast-layout.js
Normal file
64
modules/scanner/assets/js/layouts/color-contrast-layout.js
Normal file
|
@ -0,0 +1,64 @@
|
|||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { ColorContrastForm } from '@ea11y-apps/scanner/components/color-contrast-form';
|
||||
import { FormNavigation } from '@ea11y-apps/scanner/components/form-navigation';
|
||||
import { BLOCKS, COLOR_ELEMENT_CLASS } from '@ea11y-apps/scanner/constants';
|
||||
import { useScannerWizardContext } from '@ea11y-apps/scanner/context/scanner-wizard-context';
|
||||
import { StyledContent } from '@ea11y-apps/scanner/styles/app.styles';
|
||||
import {
|
||||
focusOnElement,
|
||||
removeExistingFocus,
|
||||
} from '@ea11y-apps/scanner/utils/focus-on-element';
|
||||
import { useEffect, useState } from '@wordpress/element';
|
||||
|
||||
export const ColorContrastLayout = () => {
|
||||
const { sortedViolations, isResolved } = useScannerWizardContext();
|
||||
const [current, setCurrent] = useState(0);
|
||||
|
||||
const resolved = isResolved(BLOCKS.colorContrast);
|
||||
|
||||
useEffect(() => {
|
||||
const item = sortedViolations.colorContrast?.[current];
|
||||
if (!resolved && sortedViolations.colorContrast?.length) {
|
||||
focusOnElement(item?.node, COLOR_ELEMENT_CLASS);
|
||||
} else {
|
||||
removeExistingFocus();
|
||||
}
|
||||
|
||||
if (item) {
|
||||
mixpanelService.sendEvent(mixpanelEvents.issueSelected, {
|
||||
issue_type: item.message,
|
||||
rule_id: item.ruleId,
|
||||
wcag_level: item.reasonCategory.match(/\((AAA?|AA?|A)\)/)?.[1] || '',
|
||||
category_name: BLOCKS.colorContrast,
|
||||
current_contrast_ratio: item.messageArgs[0],
|
||||
scenario:
|
||||
item.messageArgs[3] && item.messageArgs[4]
|
||||
? 'regular_flow'
|
||||
: 'gradient',
|
||||
});
|
||||
}
|
||||
}, [current]);
|
||||
|
||||
const changeNavigation = (index) => {
|
||||
if (index > (sortedViolations.colorContrast?.length || 0) - 1) {
|
||||
setCurrent(0);
|
||||
} else {
|
||||
setCurrent(index);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledContent>
|
||||
<ColorContrastForm
|
||||
items={sortedViolations.colorContrast || []}
|
||||
current={current}
|
||||
setCurrent={changeNavigation}
|
||||
/>
|
||||
<FormNavigation
|
||||
total={sortedViolations.colorContrast?.length || 0}
|
||||
current={current}
|
||||
setCurrent={changeNavigation}
|
||||
/>
|
||||
</StyledContent>
|
||||
);
|
||||
};
|
174
modules/scanner/assets/js/list-column.js
Normal file
174
modules/scanner/assets/js/list-column.js
Normal file
|
@ -0,0 +1,174 @@
|
|||
/**
|
||||
* Accessibility List Column Enhancement
|
||||
* Handles responsive button text and CSS tooltips based on available column space
|
||||
*/
|
||||
|
||||
class EA11yListColumn {
|
||||
constructor() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
init() {
|
||||
// Wait for DOM to be ready
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', () =>
|
||||
this.setupEnhancements(),
|
||||
);
|
||||
} else {
|
||||
this.setupEnhancements();
|
||||
}
|
||||
|
||||
// Also recheck after a short delay to handle CSS timing issues
|
||||
setTimeout(() => {
|
||||
this.setupEnhancements();
|
||||
}, 500);
|
||||
}
|
||||
|
||||
setupEnhancements() {
|
||||
this.buttons = document.querySelectorAll('.ea11y-accessibility-button');
|
||||
this.columnTitles = document.querySelectorAll('.ea11y-column-title');
|
||||
|
||||
if (this.buttons.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setupResponsiveButtons();
|
||||
this.setupResponsiveColumnTitles();
|
||||
this.setupResizeObserver();
|
||||
this.setupWindowResize();
|
||||
}
|
||||
|
||||
setupWindowResize() {
|
||||
// Add window resize listener as additional fallback
|
||||
let resizeTimeout;
|
||||
window.addEventListener('resize', () => {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(() => {
|
||||
this.setupResponsiveButtons();
|
||||
this.setupResponsiveColumnTitles();
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
|
||||
setupResponsiveButtons() {
|
||||
this.buttons.forEach((button) => {
|
||||
this.updateButton(button);
|
||||
});
|
||||
}
|
||||
|
||||
setupResponsiveColumnTitles() {
|
||||
this.columnTitles.forEach((title) => {
|
||||
this.updateColumnTitle(title);
|
||||
});
|
||||
}
|
||||
|
||||
updateButton(button) {
|
||||
const column = button.closest('td');
|
||||
if (!column) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Use actual column width to determine behavior
|
||||
const columnWidth = column.offsetWidth;
|
||||
const textSpan = button.querySelector('.ea11y-button-text');
|
||||
if (!textSpan) {
|
||||
return;
|
||||
}
|
||||
|
||||
const fullText = button.dataset.fullText;
|
||||
const shortText = button.dataset.shortText;
|
||||
|
||||
// Threshold for switching to compact mode (can be adjusted)
|
||||
const compactThreshold = 100;
|
||||
|
||||
if (columnWidth < compactThreshold) {
|
||||
// Narrow column: short text, smaller min-width, show tooltip
|
||||
textSpan.textContent = shortText;
|
||||
button.style.minWidth = '50px';
|
||||
button.classList.remove('ea11y-tooltip-hidden');
|
||||
} else {
|
||||
// Wide column: full text, larger min-width, hide tooltip
|
||||
textSpan.textContent = fullText;
|
||||
button.style.minWidth = '80px';
|
||||
button.classList.add('ea11y-tooltip-hidden');
|
||||
}
|
||||
}
|
||||
|
||||
updateColumnTitle(title) {
|
||||
const column = title.closest('th');
|
||||
if (!column) {
|
||||
return;
|
||||
}
|
||||
|
||||
const titleAnchor = title.parentElement.querySelector('a');
|
||||
if (!titleAnchor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Use actual column width to determine behavior
|
||||
const columnWidth = column.offsetWidth;
|
||||
|
||||
// Threshold for hiding title and showing tooltip
|
||||
const hideThreshold = 100;
|
||||
|
||||
if (columnWidth < hideThreshold) {
|
||||
title.style.display = 'none';
|
||||
titleAnchor.classList.remove('ea11y-tooltip-hidden');
|
||||
} else {
|
||||
title.style.display = '';
|
||||
titleAnchor.classList.add('ea11y-tooltip-hidden');
|
||||
}
|
||||
}
|
||||
|
||||
setupResizeObserver() {
|
||||
// Use ResizeObserver to detect column width changes
|
||||
if (window.ResizeObserver) {
|
||||
const resizeObserver = new ResizeObserver((entries) => {
|
||||
entries.forEach((entry) => {
|
||||
const column = entry.target;
|
||||
|
||||
// Handle button updates
|
||||
const button = column.querySelector('.ea11y-accessibility-button');
|
||||
if (button) {
|
||||
this.updateButton(button);
|
||||
}
|
||||
|
||||
// Handle column title updates
|
||||
const title = column.querySelector('.ea11y-column-title');
|
||||
if (title) {
|
||||
this.updateColumnTitle(title);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Observe all columns containing our buttons
|
||||
this.buttons.forEach((button) => {
|
||||
const column = button.closest('td');
|
||||
if (column) {
|
||||
resizeObserver.observe(column);
|
||||
}
|
||||
});
|
||||
|
||||
// Observe all header columns containing our titles
|
||||
this.columnTitles.forEach((title) => {
|
||||
const headerColumn = title.closest('th');
|
||||
if (headerColumn) {
|
||||
resizeObserver.observe(headerColumn);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Fallback for older browsers
|
||||
let resizeTimeout;
|
||||
window.addEventListener('resize', () => {
|
||||
clearTimeout(resizeTimeout);
|
||||
resizeTimeout = setTimeout(() => {
|
||||
this.setupResponsiveButtons();
|
||||
this.setupResponsiveColumnTitles();
|
||||
}, 250);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize when script loads
|
||||
new EA11yListColumn();
|
|
@ -1,14 +1,7 @@
|
|||
import Box from '@elementor/ui/Box';
|
||||
import InputLabel from '@elementor/ui/InputLabel';
|
||||
import Paper from '@elementor/ui/Paper';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
|
||||
export const StyledBox = styled(Box)`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: ${({ theme }) => theme.spacing(2)};
|
||||
`;
|
||||
|
||||
export const StyledLabel = styled(InputLabel)`
|
||||
display: flex;
|
||||
align-items: start;
|
||||
|
|
|
@ -8,12 +8,17 @@ import Paper from '@elementor/ui/Paper';
|
|||
import Skeleton from '@elementor/ui/Skeleton';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
import { ColorPickerStyles } from '@ea11y-apps/scanner/styles/react-colourful.styles';
|
||||
|
||||
export const StyledPaper = styled(Paper)`
|
||||
export const AppContainer = styled(Paper)`
|
||||
position: relative;
|
||||
width: 425px;
|
||||
min-height: 100vh;
|
||||
height: fit-content;
|
||||
pointer-events: auto;
|
||||
|
||||
// Include color picker styles to styled components for prevent problem with cache
|
||||
${ColorPickerStyles}
|
||||
`;
|
||||
|
||||
export const HeaderCard = styled(Card)`
|
||||
|
@ -120,6 +125,39 @@ export const StyledButton = styled(Button)`
|
|||
}
|
||||
`;
|
||||
|
||||
export const ManageButtonWrap = styled(Box)`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: ${({ theme }) => theme.spacing(1.5)};
|
||||
border: 1px solid ${({ theme }) => theme.palette.action.focus};
|
||||
border-radius: ${({ theme }) => theme.shape.borderRadius}px;
|
||||
padding-right: ${({ theme }) => theme.spacing(1.5)};
|
||||
&:hover,
|
||||
&:focus .MuiPaper-root,
|
||||
&:focus-visible .MuiPaper-root {
|
||||
background-color: ${({ theme, disabled }) =>
|
||||
!disabled ? theme.palette.action.hover : 'transparent'};
|
||||
}
|
||||
`;
|
||||
|
||||
export const ActionButton = styled(Button)`
|
||||
font-weight: 400;
|
||||
justify-content: start;
|
||||
padding: ${({ theme }) => theme.spacing(1.5)};
|
||||
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:focus-visible {
|
||||
background-color: transparent;
|
||||
}
|
||||
`;
|
||||
|
||||
export const ManageButtonGroup = styled(Box)`
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: ${({ theme }) => theme.spacing(0.5)};
|
||||
`;
|
||||
|
||||
export const UpgradeContentContainer = styled(Box)`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -142,3 +180,9 @@ export const StyledBlockButtonsBox = styled(Box)`
|
|||
export const DisabledMenuItemText = styled(MenuItemText)`
|
||||
color: ${({ theme }) => theme.palette.text.disabled};
|
||||
`;
|
||||
|
||||
export const StyledBox = styled(Box)`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: ${({ theme }) => theme.spacing(3)};
|
||||
`;
|
||||
|
|
117
modules/scanner/assets/js/styles/react-colourful.styles.js
Normal file
117
modules/scanner/assets/js/styles/react-colourful.styles.js
Normal file
|
@ -0,0 +1,117 @@
|
|||
import { css } from '@elementor/ui/styles';
|
||||
|
||||
export const ColorPickerStyles = css`
|
||||
.react-colorful {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.react-colorful__saturation {
|
||||
position: relative;
|
||||
flex-grow: 1;
|
||||
border-color: transparent; /* Fixes https://github.com/omgovich/react-colorful/issues/139 */
|
||||
border-bottom: 12px solid #000;
|
||||
border-radius: 8px 8px 0 0;
|
||||
background-image:
|
||||
linear-gradient(to top, #000, rgba(0, 0, 0, 0)),
|
||||
linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
|
||||
}
|
||||
|
||||
.react-colorful__pointer-fill,
|
||||
.react-colorful__alpha-gradient {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
/* Improve elements rendering on light backgrounds */
|
||||
|
||||
.react-colorful__alpha-gradient,
|
||||
.react-colorful__saturation {
|
||||
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.react-colorful__hue,
|
||||
.react-colorful__alpha {
|
||||
position: relative;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.react-colorful__hue {
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
#f00 0%,
|
||||
#ff0 17%,
|
||||
#0f0 33%,
|
||||
#0ff 50%,
|
||||
#00f 67%,
|
||||
#f0f 83%,
|
||||
#f00 100%
|
||||
);
|
||||
}
|
||||
|
||||
/* Round bottom corners of the last element: \`Hue\` for \`ColorPicker\` or \`Alpha\` for \`AlphaColorPicker\` */
|
||||
|
||||
.react-colorful__last-control {
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
.react-colorful__interactive {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
border-radius: inherit;
|
||||
outline: none;
|
||||
/* Don't trigger the default scrolling behavior when the event is originating from this element */
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.react-colorful__pointer {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
box-sizing: border-box;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
transform: translate(-50%, -50%);
|
||||
background-color: #fff;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.react-colorful__interactive:focus .react-colorful__pointer {
|
||||
transform: translate(-50%, -50%) scale(1.1);
|
||||
}
|
||||
|
||||
/* Chessboard-like pattern for alpha related elements */
|
||||
|
||||
.react-colorful__alpha,
|
||||
.react-colorful__alpha-pointer {
|
||||
background-color: #fff;
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><rect x="8" width="8" height="8"/><rect y="8" width="8" height="8"/></svg>');
|
||||
}
|
||||
|
||||
/* Display the saturation pointer over the hue one */
|
||||
|
||||
.react-colorful__saturation-pointer {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
/* Display the hue pointer over the alpha one */
|
||||
|
||||
.react-colorful__hue-pointer {
|
||||
z-index: 2;
|
||||
}
|
||||
`;
|
|
@ -8,6 +8,7 @@ export const scannerItem = PropTypes.shape({
|
|||
aria: PropTypes.string.isRequired,
|
||||
selector: PropTypes.string.isRequired,
|
||||
}).isRequired,
|
||||
messageArgs: PropTypes.arrayOf(PropTypes.string),
|
||||
reasonCategory: PropTypes.string.isRequired,
|
||||
category: PropTypes.string.isRequired,
|
||||
level: PropTypes.string.isRequired,
|
||||
|
|
41
modules/scanner/assets/js/utils/calc-color-ratio.js
Normal file
41
modules/scanner/assets/js/utils/calc-color-ratio.js
Normal file
|
@ -0,0 +1,41 @@
|
|||
import { hexToRGB } from '@ea11y-apps/scanner/utils/convert-colors';
|
||||
|
||||
export const getLuminance = (r, g, b) => {
|
||||
const toLinear = (c) => {
|
||||
const s = c / 255;
|
||||
return s <= 0.03928 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
||||
};
|
||||
const [lr, lg, lb] = [r, g, b].map(toLinear);
|
||||
return 0.2126 * lr + 0.7152 * lg + 0.0722 * lb;
|
||||
};
|
||||
|
||||
export const contrastRatio = (rgb1, rgb2) => {
|
||||
const [l1, l2] = [getLuminance(...rgb1), getLuminance(...rgb2)];
|
||||
const [lighter, darker] = [Math.max(l1, l2), Math.min(l1, l2)];
|
||||
return (lighter + 0.05) / (darker + 0.05);
|
||||
};
|
||||
|
||||
export const isLargeText = (el) => {
|
||||
if (!el) {
|
||||
return false;
|
||||
}
|
||||
const { fontSize, fontWeight } = window.getComputedStyle(el);
|
||||
const size = parseFloat(fontSize); // px
|
||||
const weight = parseInt(fontWeight, 10);
|
||||
const isBold = weight >= 700;
|
||||
const threshold = isBold ? 18.66 : 24;
|
||||
return size >= threshold;
|
||||
};
|
||||
|
||||
export const checkContrastAA = (fgHex, bgHex, el) => {
|
||||
const fg = hexToRGB(fgHex);
|
||||
const bg = hexToRGB(bgHex);
|
||||
const ratio = contrastRatio(fg, bg);
|
||||
const large = isLargeText(el);
|
||||
const passesAA = ratio >= (large ? 3 : 4.5);
|
||||
return {
|
||||
ratio: +ratio.toFixed(2),
|
||||
largeText: large,
|
||||
passesAA,
|
||||
};
|
||||
};
|
89
modules/scanner/assets/js/utils/convert-colors.js
Normal file
89
modules/scanner/assets/js/utils/convert-colors.js
Normal file
|
@ -0,0 +1,89 @@
|
|||
export const expandHex = (hex) => {
|
||||
hex = hex.replace(/^#/, '');
|
||||
if (hex.length === 3) {
|
||||
hex = hex
|
||||
.split('')
|
||||
.map((c) => c + c)
|
||||
.join('');
|
||||
}
|
||||
return `#${hex}`;
|
||||
};
|
||||
|
||||
export const hexToRGB = (hex) => {
|
||||
hex = expandHex(hex).replace(/^#/, '');
|
||||
const num = parseInt(hex, 16);
|
||||
// eslint-disable-next-line no-bitwise
|
||||
return [(num >> 16) & 255, (num >> 8) & 255, num & 255];
|
||||
};
|
||||
|
||||
export const hexToHsl = (hex) => {
|
||||
hex = expandHex(hex).replace(/^#/, '');
|
||||
const r = parseInt(hex.slice(0, 2), 16) / 255;
|
||||
const g = parseInt(hex.slice(2, 4), 16) / 255;
|
||||
const b = parseInt(hex.slice(4, 6), 16) / 255;
|
||||
|
||||
const max = Math.max(r, g, b);
|
||||
const min = Math.min(r, g, b);
|
||||
let h = (max + min) / 2;
|
||||
let s = (max + min) / 2;
|
||||
const l = (max + min) / 2;
|
||||
|
||||
if (max === min) {
|
||||
h = s = 0;
|
||||
} else {
|
||||
const d = max - min;
|
||||
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
||||
switch (max) {
|
||||
case r:
|
||||
h = (g - b) / d + (g < b ? 6 : 0);
|
||||
break;
|
||||
case g:
|
||||
h = (b - r) / d + 2;
|
||||
break;
|
||||
case b:
|
||||
h = (r - g) / d + 4;
|
||||
break;
|
||||
}
|
||||
h *= 60;
|
||||
}
|
||||
|
||||
return {
|
||||
h: Math.round(h),
|
||||
s: Math.round(s * 100),
|
||||
l: Math.round(l * 100),
|
||||
};
|
||||
};
|
||||
|
||||
export const hslToHex = ({ h, s, l }) => {
|
||||
s /= 100;
|
||||
l /= 100;
|
||||
|
||||
const c = (1 - Math.abs(2 * l - 1)) * s;
|
||||
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
|
||||
const m = l - c / 2;
|
||||
|
||||
let r;
|
||||
let g;
|
||||
let b;
|
||||
|
||||
if (h < 60) {
|
||||
[r, g, b] = [c, x, 0];
|
||||
} else if (h < 120) {
|
||||
[r, g, b] = [x, c, 0];
|
||||
} else if (h < 180) {
|
||||
[r, g, b] = [0, c, x];
|
||||
} else if (h < 240) {
|
||||
[r, g, b] = [0, x, c];
|
||||
} else if (h < 300) {
|
||||
[r, g, b] = [x, 0, c];
|
||||
} else {
|
||||
[r, g, b] = [c, 0, x];
|
||||
}
|
||||
|
||||
const toHex = (v) => {
|
||||
const hex = Math.round((v + m) * 255).toString(16);
|
||||
return hex.length === 1 ? '0' + hex : hex;
|
||||
};
|
||||
|
||||
return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
|
||||
};
|
|
@ -1,15 +1,48 @@
|
|||
import { CURRENT_ELEMENT_CLASS } from '@ea11y-apps/scanner/constants';
|
||||
import {
|
||||
BACKGROUND_ELEMENT_CLASS,
|
||||
COLOR_ELEMENT_CLASS,
|
||||
CURRENT_ELEMENT_CLASS,
|
||||
DATA_INITIAL_BG,
|
||||
DATA_INITIAL_COLOR,
|
||||
} from '@ea11y-apps/scanner/constants';
|
||||
|
||||
export const focusOnElement = (element) => {
|
||||
removeExistingFocus();
|
||||
export const focusOnElement = (element, queryClass = null) => {
|
||||
removeExistingFocus(queryClass);
|
||||
if (element) {
|
||||
element.classList.add(CURRENT_ELEMENT_CLASS);
|
||||
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
element.classList.add(queryClass ?? CURRENT_ELEMENT_CLASS);
|
||||
if (queryClass !== BACKGROUND_ELEMENT_CLASS) {
|
||||
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const removeExistingFocus = () => {
|
||||
document.querySelectorAll(`.${CURRENT_ELEMENT_CLASS}`).forEach((element) => {
|
||||
element.classList.remove(CURRENT_ELEMENT_CLASS);
|
||||
});
|
||||
export const resetStyles = (element) => {
|
||||
const bg = element.getAttribute(DATA_INITIAL_BG);
|
||||
const color = element.getAttribute(DATA_INITIAL_COLOR);
|
||||
|
||||
if (bg && element?.style) {
|
||||
element.style['background-color'] = bg;
|
||||
element.removeAttribute(DATA_INITIAL_BG);
|
||||
}
|
||||
if (color && element?.style) {
|
||||
element.style.color = color;
|
||||
element.removeAttribute(DATA_INITIAL_COLOR);
|
||||
}
|
||||
};
|
||||
|
||||
export const removeExistingFocus = (queryClass = null) => {
|
||||
document
|
||||
.querySelectorAll(
|
||||
queryClass
|
||||
? `.${queryClass}`
|
||||
: `.${CURRENT_ELEMENT_CLASS}, .${COLOR_ELEMENT_CLASS}, .${BACKGROUND_ELEMENT_CLASS}`,
|
||||
)
|
||||
.forEach((element) => {
|
||||
element.classList.remove(
|
||||
CURRENT_ELEMENT_CLASS,
|
||||
COLOR_ELEMENT_CLASS,
|
||||
BACKGROUND_ELEMENT_CLASS,
|
||||
);
|
||||
resetStyles(element);
|
||||
});
|
||||
};
|
||||
|
|
65
modules/scanner/assets/js/utils/get-element-css-selector.js
Normal file
65
modules/scanner/assets/js/utils/get-element-css-selector.js
Normal file
|
@ -0,0 +1,65 @@
|
|||
import {
|
||||
BACKGROUND_ELEMENT_CLASS,
|
||||
COLOR_ELEMENT_CLASS,
|
||||
CURRENT_ELEMENT_CLASS,
|
||||
} from '@ea11y-apps/scanner/constants';
|
||||
import { getElementByXPath } from '@ea11y-apps/scanner/utils/get-element-by-xpath';
|
||||
|
||||
export const getElementCSSSelector = (xpath) => {
|
||||
let element = getElementByXPath(xpath);
|
||||
if (!element || !(element instanceof Element)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const ignoredClasses = new Set([
|
||||
CURRENT_ELEMENT_CLASS,
|
||||
COLOR_ELEMENT_CLASS,
|
||||
BACKGROUND_ELEMENT_CLASS,
|
||||
]);
|
||||
|
||||
const parts = [];
|
||||
|
||||
while (element && element.nodeType === Node.ELEMENT_NODE) {
|
||||
let selector = element.tagName.toLowerCase();
|
||||
|
||||
if (element.id) {
|
||||
selector += `#${element.id}`;
|
||||
parts.unshift(selector);
|
||||
break; // Stop at ID
|
||||
}
|
||||
|
||||
// Add classes unless it's <body> or ignored
|
||||
if (element.className && element.tagName.toLowerCase() !== 'body') {
|
||||
const classList = element.className
|
||||
.trim()
|
||||
.split(/\s+/)
|
||||
.filter((cls) => cls && !ignoredClasses.has(cls));
|
||||
if (classList.length) {
|
||||
selector += '.' + classList.join('.');
|
||||
}
|
||||
}
|
||||
|
||||
// Add :nth-of-type if needed
|
||||
const parent = element.parentNode;
|
||||
if (
|
||||
parent &&
|
||||
!(
|
||||
parent.tagName?.toLowerCase() === 'body' &&
|
||||
element.tagName?.toLowerCase() === 'div'
|
||||
)
|
||||
) {
|
||||
const siblings = Array.from(parent.children).filter(
|
||||
(sibling) => sibling.tagName === element.tagName,
|
||||
);
|
||||
if (siblings.length > 1) {
|
||||
const index = siblings.indexOf(element) + 1;
|
||||
selector += `:nth-of-type(${index})`;
|
||||
}
|
||||
}
|
||||
|
||||
parts.unshift(selector);
|
||||
element = element.parentElement;
|
||||
}
|
||||
|
||||
return parts.join(' > ');
|
||||
};
|
|
@ -3,6 +3,7 @@
|
|||
namespace EA11y\Modules\Scanner\Components;
|
||||
|
||||
use EA11y\Classes\Database\Exceptions\Missing_Table_Exception;
|
||||
use EA11y\Modules\Remediation\Classes\Utils;
|
||||
use EA11y\Modules\Remediation\Database\Page_Entry;
|
||||
use EA11y\Modules\Remediation\Database\Page_Table;
|
||||
use EA11y\Modules\Scanner\Database\Scan_Entry;
|
||||
|
@ -30,13 +31,16 @@ class List_Column {
|
|||
}
|
||||
|
||||
public function add_accessibility_column( $columns ) {
|
||||
$columns['accessibility_status'] = '<img src="' . esc_url( EA11Y_ASSETS_URL . 'images/logo.svg' ) . '" alt="" style="width:16px; height:16px; vertical-align:text-bottom; margin-right:8px;" />' . esc_html__( 'Accessibility scans', 'pojo-accessibility' );
|
||||
$columns['accessibility_status'] = '<a class="ea11y-tooltip ea11y-tooltip-n ea11y-tooltip-hidden" data-label="' . esc_attr__( 'Ally', 'pojo-accessibility' ) . '"><img src="' . esc_url( EA11Y_ASSETS_URL . 'images/logo.svg' ) . '" alt="" style="width:20px; height:20px; vertical-align:middle; margin-right:8px;" /></a><span class="ea11y-column-title" title="' . esc_attr__( 'Ally', 'pojo-accessibility' ) . '">' . esc_html__( 'Ally', 'pojo-accessibility' ) . '</span>';
|
||||
return $columns;
|
||||
}
|
||||
|
||||
public function render_accessibility_column_post( $column, $post_id ) {
|
||||
if ( 'accessibility_status' === $column ) {
|
||||
$url = get_permalink( $post_id );
|
||||
$post = get_post( $post_id );
|
||||
$url = in_array( $post->post_status, [ 'draft', 'pending', 'auto-draft' ], true )
|
||||
? Utils::build_draft_url( $post )
|
||||
: get_permalink( $post_id );
|
||||
$this->render_column_accessibility( $url );
|
||||
}
|
||||
}
|
||||
|
@ -80,81 +84,80 @@ class List_Column {
|
|||
|
||||
$passed = $has_scan_data && $resolved === $violation;
|
||||
|
||||
$percentage = $violation > 0
|
||||
? round( ( $resolved / $violation ) * 100 )
|
||||
: '0';
|
||||
|
||||
$level_class = $this->get_scan_level( $percentage );
|
||||
|
||||
$separator = strpos( $url, '?' ) !== false ? '&' : '?';
|
||||
$assistant_url = esc_url( $url . $separator . 'open-ea11y-assistant=1&open-ea11y-assistant-src=WP' );
|
||||
|
||||
/**
|
||||
* Show the percentage of fixed violations or a checkmark if all violations are fixed.
|
||||
*/
|
||||
$chip = $passed
|
||||
? '<img src="' . esc_url( EA11Y_ASSETS_URL . 'images/check-passed.svg' ) . '" alt="" style="width:18px; height:18px;" />'
|
||||
: '<span class="accessibility_status_content__percentage ' . esc_html( $level_class ) . '">' . esc_html( $percentage ) . '%</span>';
|
||||
if ( $passed ) {
|
||||
$content = '<img src="' . esc_url( EA11Y_ASSETS_URL . 'images/check-icon.svg' ) . '" alt="' . esc_attr__( 'All accessibility issues resolved', 'pojo-accessibility' ) . '" style="width:24px; height:24px;" />';
|
||||
} else {
|
||||
if ( $has_scan_data ) {
|
||||
$issues_left = $violation - $resolved;
|
||||
$button_text = sprintf(
|
||||
/* translators: %d: number of issues to fix */
|
||||
_n( 'Fix %d issue', 'Fix %d issues', $issues_left, 'pojo-accessibility' ),
|
||||
$issues_left
|
||||
);
|
||||
$tooltip_text = sprintf(
|
||||
/* translators: %d: number of issues to fix */
|
||||
_n( 'Fix %d issue', 'Fix %d issues', $issues_left, 'pojo-accessibility' ),
|
||||
$issues_left
|
||||
);
|
||||
$button_class = 'button ea11y-accessibility-button';
|
||||
$button_style = 'color: #B91C1C; border-color: #B91C1C;';
|
||||
$short_text = esc_html__( 'Fix', 'pojo-accessibility' );
|
||||
} else {
|
||||
$button_text = esc_html__( 'Scan URL', 'pojo-accessibility' );
|
||||
$tooltip_text = esc_html__( 'Scan URL', 'pojo-accessibility' );
|
||||
$button_class = 'button button-primary ea11y-accessibility-button';
|
||||
$button_style = '';
|
||||
$short_text = esc_html__( 'Scan', 'pojo-accessibility' );
|
||||
}
|
||||
|
||||
$no_scan_icon = '<img src="' . esc_url( EA11Y_ASSETS_URL . 'images/info.svg' ) . '" alt="" style="width:18px; height:18px;" />';
|
||||
|
||||
/**
|
||||
* Show the number of fixed and total violations or "Not scanned yet" if the page has not been scanned yet.
|
||||
*/
|
||||
$status_text = $has_scan_data ? esc_html( sprintf( __( '%1$s/%2$s fixed', 'pojo-accessibility' ), $resolved, $violation ) ) : esc_html__( 'Not scanned yet', 'pojo-accessibility' );
|
||||
|
||||
$status_icon = $has_scan_data ? $chip : $no_scan_icon;
|
||||
|
||||
$stats =
|
||||
'<div class="accessibility_status_content__stats">
|
||||
<div class="accessibility_status_content__summary">
|
||||
<span class="accessibility_status_content__text">' . $status_text . '</span>
|
||||
' . $status_icon . '
|
||||
</div>
|
||||
<div class="accessibility_status_content__bar">
|
||||
<div class="accessibility_status_content__bar-fill" style="width: ' . esc_attr( $percentage ) . '%;"></div>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$button_text = $has_scan_data ? esc_html__( 'Review fixes', 'pojo-accessibility' ) : esc_html__( 'Scan now', 'pojo-accessibility' );
|
||||
$button_text = $passed ? esc_html__( 'New scan', 'pojo-accessibility' ) : $button_text;
|
||||
$button_class = $has_scan_data && ! $passed ? 'button' : 'button button-primary';
|
||||
$button_icon = $passed
|
||||
? '<img src="' . esc_url( EA11Y_ASSETS_URL . 'images/refresh-scan.svg' ) . '" alt="" style="width:16px; height:16px; vertical-align:text-top; margin-left:8px;" />'
|
||||
: '';
|
||||
|
||||
$scan_button = sprintf(
|
||||
'<a href="%1$s" class="%2$s" target="_blank" rel="noreferrer">%3$s%4$s</a>',
|
||||
$assistant_url,
|
||||
$button_class,
|
||||
$button_text,
|
||||
$button_icon
|
||||
);
|
||||
$content = sprintf(
|
||||
'<a href="%1$s" class="%2$s ea11y-tooltip ea11y-tooltip-n" target="_blank" rel="noreferrer" style="%3$s" data-full-text="%4$s" data-short-text="%5$s" data-label="%6$s"><span class="ea11y-button-text">%7$s</span></a>',
|
||||
$assistant_url,
|
||||
$button_class,
|
||||
$button_style,
|
||||
esc_attr( $button_text ),
|
||||
esc_attr( $short_text ),
|
||||
esc_attr( $tooltip_text ),
|
||||
$button_text
|
||||
);
|
||||
}
|
||||
|
||||
echo '<div class="accessibility_status_content">
|
||||
' . $stats . '
|
||||
<div class="accessibility_status_content__actions">' . $scan_button . '</div>
|
||||
<div class="accessibility_status_content__actions">' . $content . '</div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
private function get_scan_level( int $percent ): ?string {
|
||||
switch ( true ) {
|
||||
case ( $percent >= 0 && $percent <= 25 ):
|
||||
return 'red';
|
||||
case ( $percent >= 26 && $percent <= 60 ):
|
||||
return 'orange';
|
||||
case ( $percent >= 61 ):
|
||||
return 'grey';
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Component constructor.
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'init', [ $this, 'build_column' ] );
|
||||
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue assets for the accessibility column enhancements.
|
||||
*/
|
||||
public function enqueue_assets() {
|
||||
$screen = get_current_screen();
|
||||
|
||||
// Only load on edit.php pages (post list tables) and edit-tags.php (taxonomy list tables)
|
||||
if ( ! $screen || ! in_array( $screen->base, [ 'edit', 'edit-tags' ], true ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Enqueue JavaScript
|
||||
wp_enqueue_script(
|
||||
'ea11y-list-column',
|
||||
EA11Y_URL . 'modules/scanner/assets/js/list-column.js',
|
||||
[],
|
||||
EA11Y_VERSION,
|
||||
true
|
||||
);
|
||||
|
||||
// CSS is now included in the main ea11y-scanner-admin.scss file
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,69 +38,69 @@ class Scan_Entry extends Entry {
|
|||
return isset( $entries[0] ) ? json_decode( $entries[0]->summary, true ) : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* get_scans
|
||||
* @param string $url
|
||||
* @param bool $latest
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_scans( string $url, int $limit = 10 ) : array {
|
||||
$where = [
|
||||
[
|
||||
'column' => Scans_Table::URL,
|
||||
'value' => $url,
|
||||
'operator' => '=',
|
||||
],
|
||||
];
|
||||
/**
|
||||
* get_scans
|
||||
* @param string $url
|
||||
* @param bool $latest
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function get_scans( string $url, int $limit = 10 ) : array {
|
||||
$where = [
|
||||
[
|
||||
'column' => Scans_Table::URL,
|
||||
'value' => $url,
|
||||
'operator' => '=',
|
||||
],
|
||||
];
|
||||
|
||||
$entries = Scans_Table::select( '*', $where, $limit, null, '', ['created_at' => 'desc'] );
|
||||
$entries = Scans_Table::select( '*', $where, $limit, null, '', [ 'created_at' => 'desc' ] );
|
||||
|
||||
return array_map( function ( $entry ) {
|
||||
$entry->summary = json_decode( $entry->summary, true );
|
||||
return array_map( function ( $entry ) {
|
||||
$entry->summary = json_decode( $entry->summary, true );
|
||||
|
||||
return $entry;
|
||||
}, $entries);
|
||||
}
|
||||
return $entry;
|
||||
}, $entries);
|
||||
}
|
||||
|
||||
public static function get_by_id( int $id ) {
|
||||
$where = [
|
||||
[
|
||||
'column' => Scans_Table::ID,
|
||||
'value' => $id,
|
||||
'operator' => '=',
|
||||
],
|
||||
];
|
||||
public static function get_by_id( int $id ) {
|
||||
$where = [
|
||||
[
|
||||
'column' => Scans_Table::ID,
|
||||
'value' => $id,
|
||||
'operator' => '=',
|
||||
],
|
||||
];
|
||||
|
||||
$entries = Scans_Table::select( '*', $where, 1 );
|
||||
$entries = Scans_Table::select( '*', $where, 1 );
|
||||
|
||||
if (isset($entries[0])) {
|
||||
$entries[0]->summary = json_decode( $entries[0]->summary, true );
|
||||
if ( isset( $entries[0] ) ) {
|
||||
$entries[0]->summary = json_decode( $entries[0]->summary, true );
|
||||
|
||||
return $entries[0];
|
||||
}
|
||||
return $entries[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $by
|
||||
* @param string $by_value
|
||||
* @param string $content
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function update_scan_summary( string $by, string $by_value, string $content ): void {
|
||||
$where = [
|
||||
$by => $by_value,
|
||||
];
|
||||
/**
|
||||
* @param string $by
|
||||
* @param string $by_value
|
||||
* @param string $content
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function update_scan_summary( string $by, string $by_value, string $content ): void {
|
||||
$where = [
|
||||
$by => $by_value,
|
||||
];
|
||||
|
||||
$data = [
|
||||
Scans_Table::SUMMARY => $content,
|
||||
];
|
||||
$data = [
|
||||
Scans_Table::SUMMARY => $content,
|
||||
];
|
||||
|
||||
Scans_Table::update( $data, $where );
|
||||
}
|
||||
Scans_Table::update( $data, $where );
|
||||
}
|
||||
|
||||
/**
|
||||
* Create
|
||||
|
|
|
@ -103,6 +103,7 @@ class Module extends Module_Base {
|
|||
'planData' => Settings::get( Settings::PLAN_DATA ),
|
||||
'planScope' => Settings::get( Settings::PLAN_SCOPE ),
|
||||
'pluginEnv' => Settings_Module::get_plugin_env(),
|
||||
'pluginVersion' => EA11Y_VERSION,
|
||||
'isConnected' => Connect::is_connected(),
|
||||
'isRTL' => is_rtl(),
|
||||
]
|
||||
|
@ -119,10 +120,12 @@ class Module extends Module_Base {
|
|||
}
|
||||
|
||||
public static function is_active(): bool {
|
||||
return self::has_required_permissions() &&
|
||||
self::is_connected_and_enabled();
|
||||
return (
|
||||
self::has_required_permissions() &&
|
||||
self::is_connected_and_enabled()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
private static function has_required_permissions(): bool {
|
||||
return is_user_logged_in() && current_user_can( 'manage_options' );
|
||||
}
|
||||
|
|
|
@ -48,6 +48,16 @@ class Scanner_Stats extends Route_Base {
|
|||
'aa' => 0,
|
||||
'aaa' => 0,
|
||||
],
|
||||
'issue_by_category' => [
|
||||
'altText' => 0,
|
||||
'dynamicContent' => 0,
|
||||
'formsInputsError' => 0,
|
||||
'keyboardAssistiveTech' => 0,
|
||||
'pageStructureNav' => 0,
|
||||
'tables' => 0,
|
||||
'colorContrast' => 0,
|
||||
'other' => 0,
|
||||
],
|
||||
];
|
||||
|
||||
$pages_scanned = Page_Entry::get_pages();
|
||||
|
@ -69,6 +79,14 @@ class Scanner_Stats extends Route_Base {
|
|||
|
||||
foreach ( $remediations as $remediation ) {
|
||||
$output['issue_levels'][ strtolower( $remediation->category ) ] ++;
|
||||
|
||||
// Map group to the correct key format expected by frontend
|
||||
$group = $remediation->group;
|
||||
if ( isset( $output['issue_by_category'][ $group ] ) ) {
|
||||
$output['issue_by_category'][ $group ] ++;
|
||||
} else {
|
||||
$output['issue_by_category']['other'] ++;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->respond_success_json( $output );
|
||||
|
|
|
@ -15,7 +15,7 @@ import {
|
|||
useSavedSettings,
|
||||
useSettings,
|
||||
} from '@ea11y/hooks';
|
||||
import { QuotaNotices, Sidebar, TopBar } from '@ea11y/layouts';
|
||||
import { Sidebar, TopBar } from '@ea11y/layouts';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { useEffect } from '@wordpress/element';
|
||||
import { usePluginSettingsContext } from './contexts/plugin-settings';
|
||||
|
@ -59,7 +59,6 @@ const App = () => {
|
|||
<Sidebar />
|
||||
|
||||
<StyledContainer>
|
||||
<QuotaNotices />
|
||||
<PageContent
|
||||
// Looks the best if we have both checks
|
||||
isLoading={!hasFinishedResolution || loading}
|
||||
|
|
|
@ -5,35 +5,31 @@ import Dialog from '@elementor/ui/Dialog';
|
|||
import DialogActions from '@elementor/ui/DialogActions';
|
||||
import DialogContent from '@elementor/ui/DialogContent';
|
||||
import DialogContentText from '@elementor/ui/DialogContentText';
|
||||
import DialogHeader from '@elementor/ui/DialogHeader';
|
||||
import DialogTitle from '@elementor/ui/DialogTitle';
|
||||
import FormControlLabel from '@elementor/ui/FormControlLabel';
|
||||
import Infotip from '@elementor/ui/Infotip';
|
||||
import Switch from '@elementor/ui/Switch';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useAnalyticsContext } from '../../contexts/analytics-context';
|
||||
|
||||
export const AnalyticsToggle = () => {
|
||||
const { isAnalyticsEnabled, updateIsAnalyticsEnabled } =
|
||||
useAnalyticsContext();
|
||||
const [showConfirm, setShowConfirm] = useState(false);
|
||||
const {
|
||||
isAnalyticsEnabled,
|
||||
handleAnalyticsToggle,
|
||||
updateIsAnalyticsEnabled,
|
||||
showConfirmPopup,
|
||||
setShowConfirmPopup,
|
||||
} = useAnalyticsContext();
|
||||
|
||||
const handleToggle = () => {
|
||||
if (isAnalyticsEnabled) {
|
||||
updateIsAnalyticsEnabled();
|
||||
} else {
|
||||
setShowConfirm(true);
|
||||
}
|
||||
|
||||
mixpanelService.sendEvent(mixpanelEvents.toggleClicked, {
|
||||
state: isAnalyticsEnabled ? 'off' : 'on',
|
||||
type: 'Enable analytics',
|
||||
});
|
||||
const handleToggleClick = () => {
|
||||
handleAnalyticsToggle();
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
setShowConfirm(false);
|
||||
setShowConfirmPopup(false);
|
||||
|
||||
mixpanelService.sendEvent(mixpanelEvents.popupButtonClicked, {
|
||||
data: {
|
||||
|
@ -45,7 +41,7 @@ export const AnalyticsToggle = () => {
|
|||
|
||||
const handleConfirm = () => {
|
||||
updateIsAnalyticsEnabled();
|
||||
setShowConfirm(false);
|
||||
setShowConfirmPopup(false);
|
||||
|
||||
mixpanelService.sendEvent(mixpanelEvents.popupButtonClicked, {
|
||||
data: {
|
||||
|
@ -62,7 +58,7 @@ export const AnalyticsToggle = () => {
|
|||
<Switch
|
||||
color="info"
|
||||
checked={isAnalyticsEnabled}
|
||||
onChange={handleToggle}
|
||||
onChange={handleToggleClick}
|
||||
sx={{ ml: 2 }}
|
||||
/>
|
||||
}
|
||||
|
@ -90,21 +86,28 @@ export const AnalyticsToggle = () => {
|
|||
sx={{ ml: 0 }}
|
||||
/>
|
||||
<Dialog
|
||||
open={showConfirm}
|
||||
open={showConfirmPopup}
|
||||
onClose={handleClose}
|
||||
aria-labelledby="confirm-enable-analytics-title"
|
||||
aria-describedby="confirm-enable-analytics-description"
|
||||
>
|
||||
<DialogContent>
|
||||
<Typography variant="h5" align="center" sx={{ mb: 3 }}>
|
||||
{__('Confirm widget data tracking', 'pojo-accessibility')}
|
||||
</Typography>
|
||||
<DialogContentText
|
||||
id="confirm-enable-analytics-description"
|
||||
align="center"
|
||||
>
|
||||
<DialogHeader>
|
||||
<DialogTitle>
|
||||
{__('Enable widget tracking?', 'pojo-accessibility')}
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
<DialogContent
|
||||
sx={{ gap: 2, display: 'flex', flexDirection: 'column' }}
|
||||
>
|
||||
<DialogContentText id="confirm-enable-analytics-description">
|
||||
{__(
|
||||
'Enabling data tracking let’s you see how users interact with your widget and features. Keep in mind: Real-time data processing may slightly impact a site’s performance, especially on high-traffic websites.',
|
||||
'This allows Ally to record how visitors open and use your accessibility widget, unlocking real‑time analytics.',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</DialogContentText>
|
||||
<DialogContentText id="confirm-enable-analytics-description">
|
||||
{__(
|
||||
'This may slightly affect performance on high‑traffic sites.',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</DialogContentText>
|
||||
|
|
|
@ -2,6 +2,7 @@ import { ChevronDownIcon, InfoCircleFilledIcon } from '@elementor/icons';
|
|||
import Alert from '@elementor/ui/Alert';
|
||||
import AlertTitle from '@elementor/ui/AlertTitle';
|
||||
import Box from '@elementor/ui/Box';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import Grid from '@elementor/ui/Grid';
|
||||
import MenuItem from '@elementor/ui/MenuItem';
|
||||
import Select from '@elementor/ui/Select';
|
||||
|
@ -31,6 +32,7 @@ export const ChartsList = () => {
|
|||
loading,
|
||||
period,
|
||||
setPeriod,
|
||||
handleAnalyticsToggle,
|
||||
} = useAnalyticsContext();
|
||||
|
||||
/**
|
||||
|
@ -58,6 +60,19 @@ export const ChartsList = () => {
|
|||
color="info"
|
||||
icon={<InfoCircleFilledIcon />}
|
||||
sx={{ width: '100%' }}
|
||||
action={
|
||||
!availableDate &&
|
||||
!isAnalyticsEnabled && (
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="info"
|
||||
size="small"
|
||||
onClick={() => handleAnalyticsToggle()}
|
||||
>
|
||||
{__('Enable tracking', 'pojo-accessibility')}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
>
|
||||
{availableDate && !isAnalyticsEnabled && (
|
||||
<>
|
||||
|
@ -69,7 +84,7 @@ export const ChartsList = () => {
|
|||
)}
|
||||
</AlertTitle>
|
||||
{__(
|
||||
'We are showing you data collecting in the past',
|
||||
'We are showing you data collected in the past',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</>
|
||||
|
@ -77,10 +92,10 @@ export const ChartsList = () => {
|
|||
{!availableDate && isAnalyticsEnabled && (
|
||||
<>
|
||||
<AlertTitle sx={{ width: '100%' }}>
|
||||
{__('Not enough data', 'pojo-accessibility')}
|
||||
{__('Not enough data to show yet', 'pojo-accessibility')}
|
||||
</AlertTitle>
|
||||
{__(
|
||||
"We don't have enough data to show you for those days",
|
||||
'Analytics appear once enough visitors interact with your accessibility widget.',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</>
|
||||
|
@ -88,10 +103,10 @@ export const ChartsList = () => {
|
|||
{!availableDate && !isAnalyticsEnabled && (
|
||||
<>
|
||||
<AlertTitle sx={{ width: '100%' }}>
|
||||
{__('Need to switch on', 'pojo-accessibility')}
|
||||
{__('Analytics are off.', 'pojo-accessibility')}
|
||||
</AlertTitle>
|
||||
{__(
|
||||
"We don't have enough data to show you for those days",
|
||||
'Switch on ״Track widget data״ to start collecting usage data for your widget.',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</>
|
||||
|
|
|
@ -48,7 +48,6 @@ const QuotaBarGroup = ({ collapsible = true, popup = false }) => {
|
|||
|
||||
const QuotaBars = () => (
|
||||
<StyledCardContentInner>
|
||||
<QuotaBarComponent type="visits" quotaData={planData?.visits} />
|
||||
<QuotaBarComponent type="scanner" quotaData={planData?.scannedPages} />
|
||||
<QuotaBarComponent type="ai" quotaData={planData?.aiCredits} />
|
||||
</StyledCardContentInner>
|
||||
|
|
|
@ -9,27 +9,24 @@ import { __ } from '@wordpress/i18n';
|
|||
const QuotaIndicator = () => {
|
||||
const { planData, openSidebar } = useSettings();
|
||||
|
||||
if (!planData?.scannedPages || !planData?.visits || !planData?.aiCredits) {
|
||||
if (!planData?.scannedPages || !planData?.aiCredits) {
|
||||
return null; // Return null if data is not available
|
||||
}
|
||||
|
||||
const { scannedPages, visits, aiCredits } = planData;
|
||||
const { scannedPages, aiCredits } = planData;
|
||||
|
||||
// calculate usage data of each quota
|
||||
const scannedPagesUsage = Math.round(
|
||||
(scannedPages.used / scannedPages.allowed) * 100,
|
||||
);
|
||||
const visitsUsage = Math.round((visits.used / visits.allowed) * 100);
|
||||
const aiCreditsUsage = Math.round((aiCredits.used / aiCredits.allowed) * 100);
|
||||
|
||||
// check if any of the quota is 100% used
|
||||
const isQuotaExceeded =
|
||||
scannedPagesUsage >= 100 || visitsUsage >= 100 || aiCreditsUsage >= 100;
|
||||
const isQuotaExceeded = scannedPagesUsage >= 100 || aiCreditsUsage >= 100;
|
||||
|
||||
// check if any of the quota is 80% but not 100% used
|
||||
const isQuotaWarning =
|
||||
(scannedPagesUsage >= 80 && scannedPagesUsage < 100) ||
|
||||
(visitsUsage >= 80 && visitsUsage < 100) ||
|
||||
(aiCreditsUsage >= 80 && aiCreditsUsage < 100);
|
||||
|
||||
if (isQuotaExceeded) {
|
||||
|
|
|
@ -97,7 +97,7 @@ const MenuItem = ({ keyName, item }) => {
|
|||
|
||||
{
|
||||
/* Show infotip */
|
||||
openSidebar && item?.infotip
|
||||
openSidebar && !showProIcon(item) && item?.infotip
|
||||
}
|
||||
|
||||
{item?.children && (
|
||||
|
|
|
@ -10,6 +10,7 @@ import {
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { AccessibilityAssistantContextProvider } from '../../contexts/accessibility-assistant-context';
|
||||
import AccessibilityStatementTooltip from './tooltips/accessibility-statement';
|
||||
import AnalyticsTooltip from './tooltips/analytics';
|
||||
|
||||
export const MenuItems = {
|
||||
scanner: {
|
||||
|
@ -94,5 +95,6 @@ export const MenuItems = {
|
|||
sx={{ color: 'common.black' }}
|
||||
/>
|
||||
),
|
||||
infotip: <AnalyticsTooltip />,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
import { InfoCircleIcon } from '@elementor/icons';
|
||||
import Button from '@elementor/ui/Button';
|
||||
import Card from '@elementor/ui/Card';
|
||||
import CardActions from '@elementor/ui/CardActions';
|
||||
import CardContent from '@elementor/ui/CardContent';
|
||||
import CardHeader from '@elementor/ui/CardHeader';
|
||||
import Infotip from '@elementor/ui/Infotip';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { useSettings } from '@ea11y/hooks';
|
||||
import { useState } from '@wordpress/element';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { useAnalyticsContext } from '../../../contexts/analytics-context';
|
||||
|
||||
const AnalyticsTooltip = () => {
|
||||
const { setSelectedMenu } = useSettings();
|
||||
const { handleAnalyticsToggle, isAnalyticsEnabled } = useAnalyticsContext();
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
|
||||
// Don't show tooltip if analytics is already enabled
|
||||
if (isAnalyticsEnabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const handleOpen = () => {
|
||||
setIsOpen(true);
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
setIsOpen(false);
|
||||
};
|
||||
|
||||
const handleEnableTracking = () => {
|
||||
// Execute the analytics functionality
|
||||
setSelectedMenu('analytics');
|
||||
handleAnalyticsToggle();
|
||||
// Close the tooltip
|
||||
handleClose();
|
||||
};
|
||||
|
||||
const TooltipCard = (
|
||||
<Card elevation={0} sx={{ maxWidth: 300 }}>
|
||||
<CardHeader
|
||||
title={__('Enable tracking to unlock analytics', 'pojo-accessibility')}
|
||||
/>
|
||||
|
||||
<CardContent>
|
||||
<Typography variant="body2" color="text.secondary">
|
||||
{__(
|
||||
'Get valuable insights into how visitors interact with your accessibility widget.',
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
</Typography>
|
||||
</CardContent>
|
||||
|
||||
<CardActions>
|
||||
<Button
|
||||
size="small"
|
||||
variant="contained"
|
||||
color="info"
|
||||
tabIndex="0"
|
||||
onClick={handleEnableTracking}
|
||||
>
|
||||
{__('Enable tracking', 'pojo-accessibility')}
|
||||
</Button>
|
||||
</CardActions>
|
||||
</Card>
|
||||
);
|
||||
|
||||
return (
|
||||
<Infotip
|
||||
placement="right"
|
||||
content={TooltipCard}
|
||||
tabIndex="0"
|
||||
open={isOpen}
|
||||
onClose={handleClose}
|
||||
disableHoverListener={false}
|
||||
disableFocusListener={false}
|
||||
>
|
||||
<InfoCircleIcon
|
||||
color="info"
|
||||
sx={{ ml: 1 }}
|
||||
onMouseEnter={handleOpen}
|
||||
onFocus={handleOpen}
|
||||
/>
|
||||
</Infotip>
|
||||
);
|
||||
};
|
||||
|
||||
export default AnalyticsTooltip;
|
|
@ -1,4 +1,5 @@
|
|||
import { useStorage } from '@ea11y/hooks';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
import {
|
||||
createContext,
|
||||
useContext,
|
||||
|
@ -20,6 +21,8 @@ export const AnalyticsContextProvider = ({ children }) => {
|
|||
elements: [],
|
||||
});
|
||||
|
||||
const [showConfirmPopup, setShowConfirmPopup] = useState(false);
|
||||
|
||||
/**
|
||||
* Get initial logs list
|
||||
*/
|
||||
|
@ -41,6 +44,19 @@ export const AnalyticsContextProvider = ({ children }) => {
|
|||
setPeriod(30);
|
||||
};
|
||||
|
||||
const handleAnalyticsToggle = () => {
|
||||
if (isAnalyticsEnabled) {
|
||||
updateIsAnalyticsEnabled();
|
||||
} else {
|
||||
setShowConfirmPopup(true);
|
||||
}
|
||||
|
||||
mixpanelService.sendEvent(mixpanelEvents.toggleClicked, {
|
||||
state: isAnalyticsEnabled ? 'off' : 'on',
|
||||
type: 'Enable analytics',
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<AnalyticsContext.Provider
|
||||
value={{
|
||||
|
@ -49,10 +65,13 @@ export const AnalyticsContextProvider = ({ children }) => {
|
|||
isProVersion,
|
||||
setIsProVersion,
|
||||
updateIsAnalyticsEnabled,
|
||||
handleAnalyticsToggle,
|
||||
period,
|
||||
setPeriod,
|
||||
stats,
|
||||
loading,
|
||||
showConfirmPopup,
|
||||
setShowConfirmPopup,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
|
|
@ -15,10 +15,10 @@ import {
|
|||
} from '@ea11y/icons';
|
||||
import { StatementLink } from '@ea11y/layouts';
|
||||
import {
|
||||
StyledBox,
|
||||
StyledStatementContainer,
|
||||
StyledStatementPaper,
|
||||
StyledTitle,
|
||||
StyledWideBox,
|
||||
StyledBox,
|
||||
} from '@ea11y/pages/pages.styles';
|
||||
import { GOLINKS } from '@ea11y-apps/global/constants';
|
||||
import { mixpanelEvents, mixpanelService } from '@ea11y-apps/global/services';
|
||||
|
@ -74,13 +74,8 @@ const AccessibilityStatement = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<StyledBox
|
||||
height="100%"
|
||||
display="flex"
|
||||
flexDirection="column"
|
||||
justifyContent="space-between"
|
||||
>
|
||||
<StyledStatementContainer>
|
||||
<StyledBox>
|
||||
<StyledWideBox>
|
||||
<StyledTitle variant="h4" color="text.primary" sx={{ mb: 0 }}>
|
||||
{__('Accessibility statement', 'pojo-accessibility')}
|
||||
</StyledTitle>
|
||||
|
@ -226,7 +221,7 @@ const AccessibilityStatement = () => {
|
|||
<StatementLink />
|
||||
</>
|
||||
)}
|
||||
</StyledStatementContainer>
|
||||
</StyledWideBox>
|
||||
|
||||
{!accessibilityStatementData?.pageId && !showStatementLink && (
|
||||
<Box
|
||||
|
|
|
@ -123,11 +123,27 @@ const StyledHeadingWrapper = styled(Box)`
|
|||
`;
|
||||
|
||||
const StyledHeadingContainer = styled(Container)`
|
||||
padding: ${({ theme }) => theme.spacing(4.5)};
|
||||
padding-top: ${({ theme }) => theme.spacing(4)};
|
||||
padding-bottom: ${({ theme }) => theme.spacing(4)};
|
||||
padding-left: ${({ theme }) => theme.spacing(4)};
|
||||
padding-right: ${({ theme }) => theme.spacing(4)};
|
||||
|
||||
@media (min-width: ${({ theme }) => theme.breakpoints.values.xl}px) {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledContainer = styled(Container)`
|
||||
padding: ${({ theme }) => theme.spacing(4)};
|
||||
padding-top: ${({ theme }) => theme.spacing(4)};
|
||||
padding-bottom: ${({ theme }) => theme.spacing(4)};
|
||||
padding-left: ${({ theme }) => theme.spacing(4)};
|
||||
padding-right: ${({ theme }) => theme.spacing(4)};
|
||||
|
||||
@media (min-width: ${({ theme }) => theme.breakpoints.values.xl}px) {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
export default AccessibilityAssistant;
|
||||
|
|
|
@ -119,7 +119,7 @@ export const DropdownMenu = ({ pageUrl, remediationCount }) => {
|
|||
<SettingsIcon color="disabled" />
|
||||
</MenuItemIcon>
|
||||
<DisabledMenuItemText>
|
||||
{__('Manage AI fixes', 'pojo-accessibility')}
|
||||
{__('Manage fixes', 'pojo-accessibility')}
|
||||
</DisabledMenuItemText>
|
||||
</MenuItem>
|
||||
</Tooltip>
|
||||
|
@ -136,7 +136,7 @@ export const DropdownMenu = ({ pageUrl, remediationCount }) => {
|
|||
<SettingsIcon />
|
||||
</MenuItemIcon>
|
||||
<MenuItemText>
|
||||
{__('Manage AI fixes', 'pojo-accessibility')}
|
||||
{__('Manage fixes', 'pojo-accessibility')}
|
||||
</MenuItemText>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
|
|
@ -0,0 +1,160 @@
|
|||
import {
|
||||
ColorBlue100,
|
||||
ColorBlue200,
|
||||
ColorBlue300,
|
||||
ColorBlue400,
|
||||
ColorBlue500,
|
||||
ColorBlue700,
|
||||
ColorBlue900,
|
||||
} from '@elementor/design-tokens/primitives';
|
||||
import Box from '@elementor/ui/Box';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
import PropTypes from 'prop-types';
|
||||
import { BLOCK_TITLES } from '@ea11y-apps/scanner/constants';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
const CategoryPieChart = ({ issueByCategory, loading }) => {
|
||||
// Loading state
|
||||
if (loading) {
|
||||
const loadingBackground = `
|
||||
radial-gradient(closest-side, white 84%, transparent 85% 100%),
|
||||
conic-gradient(#e5e7eb 0%, #f3f3f4 50%, #e5e7eb 100%)
|
||||
`;
|
||||
return <StyledLoadingPieChart background={loadingBackground} />;
|
||||
}
|
||||
|
||||
// Process categories similar to issue-by-category.js
|
||||
const processedCategories = () => {
|
||||
// Convert to array and sort by count (descending)
|
||||
const sortedCategories = Object.entries(issueByCategory || {})
|
||||
.map(([key, count]) => ({
|
||||
key,
|
||||
title: BLOCK_TITLES[key] || key,
|
||||
count: count || 0,
|
||||
}))
|
||||
.sort((a, b) => b.count - a.count);
|
||||
|
||||
// Calculate total issues across all categories
|
||||
const totalIssues = sortedCategories.reduce(
|
||||
(sum, category) => sum + category.count,
|
||||
0,
|
||||
);
|
||||
|
||||
// Take top 6 categories
|
||||
const top6 = sortedCategories.slice(0, 6);
|
||||
// Calculate "other" count from remaining categories
|
||||
const otherCount = sortedCategories
|
||||
.slice(6)
|
||||
.reduce((sum, category) => sum + category.count, 0);
|
||||
|
||||
// Add "other" category if there are remaining categories or if it has count
|
||||
const result = [...top6];
|
||||
if (otherCount > 0 || sortedCategories.length > 6) {
|
||||
result.push({
|
||||
key: 'other',
|
||||
title: __('Other', 'pojo-accessibility'),
|
||||
count: otherCount,
|
||||
});
|
||||
}
|
||||
|
||||
// Convert counts to percentages and add colors
|
||||
return result.map((category, index) => ({
|
||||
key: category.key,
|
||||
percentage:
|
||||
totalIssues > 0 ? Math.round((category.count / totalIssues) * 100) : 0,
|
||||
color:
|
||||
[
|
||||
ColorBlue900,
|
||||
ColorBlue700,
|
||||
ColorBlue500,
|
||||
ColorBlue400,
|
||||
ColorBlue300,
|
||||
ColorBlue200,
|
||||
ColorBlue100, // for "other"
|
||||
][index] || ColorBlue100,
|
||||
}));
|
||||
};
|
||||
|
||||
const categories = processedCategories();
|
||||
|
||||
// Create conic-gradient string
|
||||
const createConicGradient = () => {
|
||||
if (categories.length === 0) {
|
||||
return 'conic-gradient(#f3f3f4 0%, #f3f3f4 100%)';
|
||||
}
|
||||
|
||||
let cumulativePercentage = 0;
|
||||
const gradientStops = [];
|
||||
|
||||
categories.forEach((category) => {
|
||||
const startPercentage = cumulativePercentage;
|
||||
const endPercentage = cumulativePercentage + category.percentage;
|
||||
|
||||
gradientStops.push(
|
||||
`${category.color} ${startPercentage}% ${endPercentage}%`,
|
||||
);
|
||||
cumulativePercentage += category.percentage;
|
||||
});
|
||||
|
||||
// Fill remaining space with light gray if total is less than 100%
|
||||
if (cumulativePercentage < 100) {
|
||||
gradientStops.push(`#f3f3f4 ${cumulativePercentage}% 100%`);
|
||||
}
|
||||
|
||||
return `conic-gradient(${gradientStops.join(', ')})`;
|
||||
};
|
||||
|
||||
const background = `
|
||||
radial-gradient(closest-side, white 84%, transparent 85% 100%),
|
||||
${createConicGradient()}
|
||||
`;
|
||||
|
||||
return <StyledCategoryPieChart background={background} />;
|
||||
};
|
||||
|
||||
CategoryPieChart.propTypes = {
|
||||
issueByCategory: PropTypes.shape({
|
||||
altText: PropTypes.number,
|
||||
dynamicContent: PropTypes.number,
|
||||
formsInputsError: PropTypes.number,
|
||||
keyboardAssistiveTech: PropTypes.number,
|
||||
pageStructureNav: PropTypes.number,
|
||||
tables: PropTypes.number,
|
||||
colorContrast: PropTypes.number,
|
||||
other: PropTypes.number,
|
||||
}),
|
||||
loading: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
const StyledCategoryPieChart = styled(Box)`
|
||||
width: 176px;
|
||||
height: 176px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 100%;
|
||||
background: ${({ background }) => background};
|
||||
margin-right: ${({ theme }) => theme.spacing(1.5)};
|
||||
`;
|
||||
|
||||
const StyledLoadingPieChart = styled(Box)`
|
||||
width: 176px;
|
||||
height: 176px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 100%;
|
||||
background: ${({ background }) => background};
|
||||
animation: rotate 3s linear infinite;
|
||||
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export default CategoryPieChart;
|
|
@ -4,15 +4,14 @@ import { styled } from '@elementor/ui/styles';
|
|||
import PropTypes from 'prop-types';
|
||||
import PieChartLoader from '@ea11y/pages/assistant/loaders/pie-chart-loader';
|
||||
import ValueLoader from '@ea11y/pages/assistant/loaders/value-loader';
|
||||
import AccessibilityAssistantStatsIssueResovledBYCategory from '@ea11y/pages/assistant/stats/issue-by-category';
|
||||
import AccessibilityAssistantStatsIssueLevels from '@ea11y/pages/assistant/stats/issue-levels';
|
||||
import StatsPieChart from '@ea11y/pages/assistant/stats/pie-chart';
|
||||
import AccessibilityAssistantTooltip from '@ea11y/pages/assistant/tooltip';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import CategoryPieChart from './category-pie-chart';
|
||||
|
||||
const AccessibilityAssistantStats = ({ stats, loading, noResultsState }) => {
|
||||
const resolvedPercentage = stats.issues_total
|
||||
? Math.round((stats.issues_fixed / stats.issues_total) * 100)
|
||||
: 0;
|
||||
const levelsTotal =
|
||||
stats.issue_levels.a + stats.issue_levels.aa + stats.issue_levels.aaa;
|
||||
|
||||
|
@ -24,16 +23,18 @@ const AccessibilityAssistantStats = ({ stats, loading, noResultsState }) => {
|
|||
? Math.round((stats.issue_levels.aa / levelsTotal) * 100)
|
||||
: 0;
|
||||
|
||||
const openIssues = stats.issues_total - stats.issues_fixed;
|
||||
|
||||
return (
|
||||
<StyledStatsContainer>
|
||||
<StyledStatsItem>
|
||||
<StyledStatsItem className="scanned-urls">
|
||||
<StyledStatsItemContent>
|
||||
<StyledStatsItemTitle variant="subtitle1" as="p">
|
||||
{__('Scanned URLs', 'pojo-accessibility')}
|
||||
|
||||
<AccessibilityAssistantTooltip
|
||||
content={__(
|
||||
'View how many URLs you’ve already scanned for accessibility issues. A URL can be any page on your site, like a blog post or product page.',
|
||||
"View how many URLs you've already scanned for accessibility issues. A URL can be any page on your site, like a blog post or product page.",
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
/>
|
||||
|
@ -45,55 +46,33 @@ const AccessibilityAssistantStats = ({ stats, loading, noResultsState }) => {
|
|||
</StyledStatsItemContent>
|
||||
</StyledStatsItem>
|
||||
|
||||
<StyledStatsItem>
|
||||
<StyledStatsItem className="open-issues">
|
||||
<StyledStatsItemContent>
|
||||
<StyledStatsItemTitle variant="subtitle1" as="p">
|
||||
{__('Issues resolved', 'pojo-accessibility')}
|
||||
{__('Open Issues', 'pojo-accessibility')}
|
||||
|
||||
<AccessibilityAssistantTooltip
|
||||
content={__(
|
||||
'Monitor how many issues from your latest scans have been resolved. New scans reflect your latest changes, so these numbers update as you resolve more issues.',
|
||||
"View the number of accessibility issues that still need to be resolved. These are issues found during your latest scans that haven't been fixed yet.",
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
/>
|
||||
</StyledStatsItemTitle>
|
||||
|
||||
<Typography variant="h4" as="p">
|
||||
{loading ? (
|
||||
<ValueLoader />
|
||||
) : (
|
||||
`${stats.issues_fixed}/${stats.issues_total}`
|
||||
)}
|
||||
{loading ? <ValueLoader /> : openIssues}
|
||||
</Typography>
|
||||
</StyledStatsItemContent>
|
||||
|
||||
<StyledStatsItemChart>
|
||||
{loading ? (
|
||||
<PieChartLoader />
|
||||
) : (
|
||||
<StatsPieChart
|
||||
value={
|
||||
<Typography variant="h4" as="span">
|
||||
{resolvedPercentage}
|
||||
<Typography variant="h6" as="span">
|
||||
%
|
||||
</Typography>
|
||||
</Typography>
|
||||
}
|
||||
firstSectorPercentage={resolvedPercentage}
|
||||
/>
|
||||
)}
|
||||
</StyledStatsItemChart>
|
||||
</StyledStatsItem>
|
||||
|
||||
<StyledStatsItem>
|
||||
<StyledStatsItem className="resolved-issues-by-level">
|
||||
<StyledStatsItemContent>
|
||||
<StyledStatsItemTitle variant="subtitle1" as="p">
|
||||
<StyledStatsItemTitle variant="subtitle1" as="p" spacing={3}>
|
||||
{__('Resolved issues by level', 'pojo-accessibility')}
|
||||
|
||||
<AccessibilityAssistantTooltip
|
||||
content={__(
|
||||
'Track how many issues you’ve resolved for each WCAG level. Meeting these guidelines helps make your site more accessible and inclusive for all visitors.',
|
||||
"Track how many issues you've resolved for each WCAG level. Meeting these guidelines helps make your site more accessible and inclusive for all visitors.",
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
/>
|
||||
|
@ -121,6 +100,36 @@ const AccessibilityAssistantStats = ({ stats, loading, noResultsState }) => {
|
|||
)}
|
||||
</StyledStatsItemChart>
|
||||
</StyledStatsItem>
|
||||
|
||||
<StyledStatsItem className="resolved-issues-by-category">
|
||||
<StyledStatsItemContent>
|
||||
<StyledStatsItemTitle variant="subtitle1" as="p" spacing={3}>
|
||||
{__('Resolved issues by category', 'pojo-accessibility')}
|
||||
|
||||
<AccessibilityAssistantTooltip
|
||||
content={__(
|
||||
"Track how many accessibility issues you've resolved in each category.",
|
||||
'pojo-accessibility',
|
||||
)}
|
||||
/>
|
||||
</StyledStatsItemTitle>
|
||||
|
||||
{loading ? (
|
||||
<ValueLoader />
|
||||
) : (
|
||||
<AccessibilityAssistantStatsIssueResovledBYCategory
|
||||
issueByCategory={stats.issue_by_category}
|
||||
/>
|
||||
)}
|
||||
</StyledStatsItemContent>
|
||||
|
||||
<StyledStatsItemChart>
|
||||
<CategoryPieChart
|
||||
loading={loading}
|
||||
issueByCategory={stats.issue_by_category}
|
||||
/>
|
||||
</StyledStatsItemChart>
|
||||
</StyledStatsItem>
|
||||
</StyledStatsContainer>
|
||||
);
|
||||
};
|
||||
|
@ -135,18 +144,14 @@ const StyledStatsContainer = styled(Box)`
|
|||
margin-top: ${({ theme }) => theme.spacing(3)};
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
grid-template-rows: 1fr;
|
||||
grid-column-gap: ${({ theme }) => theme.spacing(3)};
|
||||
grid-row-gap: 0;
|
||||
grid-template-columns: 1fr 1fr 2fr;
|
||||
grid-template-rows: 104px 176px;
|
||||
grid-column-gap: ${({ theme }) => theme.spacing(2)};
|
||||
grid-row-gap: ${({ theme }) => theme.spacing(2)};
|
||||
|
||||
@media screen and (max-width: 960px) {
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
grid-row-gap: ${({ theme }) => theme.spacing(3)};
|
||||
}
|
||||
|
||||
@media screen and (max-width: 705px) {
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: repeat(4, 1fr);
|
||||
}
|
||||
`;
|
||||
|
||||
|
@ -165,30 +170,18 @@ const StyledStatsItem = styled(Box)`
|
|||
}
|
||||
|
||||
:nth-of-type(2) {
|
||||
grid-area: 1 / 2 / 2 / 4;
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
}
|
||||
|
||||
:nth-of-type(3) {
|
||||
grid-area: 1 / 4 / 2 / 6;
|
||||
grid-area: 2 / 1 / 3 / 3;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1200px) {
|
||||
:nth-of-type(2) {
|
||||
grid-area: 1 / 2 / 2 / 3;
|
||||
}
|
||||
|
||||
:nth-of-type(3) {
|
||||
grid-area: 1 / 3 / 2 / 4;
|
||||
}
|
||||
:nth-of-type(4) {
|
||||
grid-area: 1 / 3 / 3 / 4;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 960px) {
|
||||
:nth-of-type(3) {
|
||||
grid-area: 2 / 1 / 3 / 3;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 705px) {
|
||||
:nth-of-type(1) {
|
||||
grid-area: 1 / 1 / 2 / 2;
|
||||
}
|
||||
|
@ -200,12 +193,17 @@ const StyledStatsItem = styled(Box)`
|
|||
:nth-of-type(3) {
|
||||
grid-area: 3 / 1 / 4 / 2;
|
||||
}
|
||||
|
||||
:nth-of-type(4) {
|
||||
grid-area: 4 / 1 / 5 / 2;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledStatsItemContent = styled(Box)`
|
||||
min-width: 150px;
|
||||
min-height: 110px;
|
||||
min-height: 50px;
|
||||
height: 100%;
|
||||
`;
|
||||
|
||||
const StyledStatsItemChart = styled(Box)`
|
||||
|
@ -224,7 +222,7 @@ const StyledStatsItemTitle = styled(Typography)`
|
|||
align-items: center;
|
||||
|
||||
margin: 0;
|
||||
margin-bottom: ${({ theme }) => theme.spacing(2)};
|
||||
margin-bottom: ${({ spacing, theme }) => theme.spacing(spacing || 2)};
|
||||
|
||||
color: ${({ theme }) => theme.palette.text.primary};
|
||||
font-feature-settings:
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
import Box from '@elementor/ui/Box';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
import PropTypes from 'prop-types';
|
||||
import { BLOCK_TITLES } from '@ea11y-apps/scanner/constants';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
// Override titles for specific category keys
|
||||
const CATEGORY_TITLE_OVERRIDES = {
|
||||
keyboardAssistiveTech: __('Keyboard/Assistive', 'pojo-accessibility'),
|
||||
dynamicContent: __('Dynamic/Aria', 'pojo-accessibility'),
|
||||
};
|
||||
|
||||
const AccessibilityAssistantStatsIssueResovledBYCategory = ({
|
||||
issueByCategory,
|
||||
}) => {
|
||||
// Process categories to show top 6 by usage + "other"
|
||||
const processedCategories = () => {
|
||||
// Convert to array and sort by count (descending)
|
||||
const sortedCategories = Object.entries(issueByCategory || {})
|
||||
.map(([key, count]) => ({
|
||||
key,
|
||||
title: CATEGORY_TITLE_OVERRIDES[key] || BLOCK_TITLES[key] || key,
|
||||
count: count || 0,
|
||||
}))
|
||||
.sort((a, b) => b.count - a.count);
|
||||
|
||||
// Calculate total issues across all categories
|
||||
const totalIssues = sortedCategories.reduce(
|
||||
(sum, category) => sum + category.count,
|
||||
0,
|
||||
);
|
||||
|
||||
// Take top 6 categories
|
||||
const top6 = sortedCategories.slice(0, 6);
|
||||
// Calculate "other" count from remaining categories
|
||||
const otherCount = sortedCategories
|
||||
.slice(6)
|
||||
.reduce((sum, category) => sum + category.count, 0);
|
||||
|
||||
// Add "other" category if there are remaining categories or if it has count
|
||||
const result = [...top6];
|
||||
if (otherCount > 0 || sortedCategories.length > 6) {
|
||||
result.push({
|
||||
key: 'other',
|
||||
title: __('Other', 'pojo-accessibility'),
|
||||
count: otherCount,
|
||||
});
|
||||
}
|
||||
|
||||
// Convert counts to percentages
|
||||
return result.map((category) => ({
|
||||
...category,
|
||||
percentage:
|
||||
totalIssues > 0 ? Math.round((category.count / totalIssues) * 100) : 0,
|
||||
}));
|
||||
};
|
||||
|
||||
const categories = processedCategories();
|
||||
|
||||
return (
|
||||
<>
|
||||
{categories.map(({ key, title, percentage }, index) => (
|
||||
<StyledIssueLevel key={key} colorIndex={index}>
|
||||
<Typography variant="body2">{title}</Typography>
|
||||
|
||||
<StyledIssuesCount variant="subtitle2" as="p">
|
||||
{percentage === 0 ? '-' : `${percentage}%`}
|
||||
</StyledIssuesCount>
|
||||
</StyledIssueLevel>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
AccessibilityAssistantStatsIssueResovledBYCategory.propTypes = {
|
||||
issueByCategory: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
const StyledIssueLevel = styled(Box)`
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
gap: ${({ theme }) => theme.spacing(1)};
|
||||
|
||||
margin-inline-start: ${({ theme }) => theme.spacing(0.5)};
|
||||
|
||||
&:not(:last-of-type) {
|
||||
margin-bottom: ${({ theme }) => theme.spacing(1)};
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-inline-end: ${({ theme }) => theme.spacing(1)};
|
||||
border-radius: 100%;
|
||||
background-color: ${({ colorIndex }) => {
|
||||
const colors = [
|
||||
'#1e3a8a', // Blue 900
|
||||
'#1d4ed8', // Blue 700
|
||||
'#3b82f6', // Blue 500
|
||||
'#60a5fa', // Blue 400
|
||||
'#93c5fd', // Blue 300
|
||||
'#BFDBFE', // Blue 200
|
||||
'#DBEAFE', // Blue 100 (for "other")
|
||||
];
|
||||
return colors[colorIndex % colors.length];
|
||||
}};
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledIssuesCount = styled(Typography)`
|
||||
margin: 0;
|
||||
margin-inline-start: auto;
|
||||
|
||||
color: ${({ theme }) => theme.palette.text.primary};
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 130%;
|
||||
letter-spacing: 0.1px;
|
||||
min-width: 50px;
|
||||
text-align: left;
|
||||
`;
|
||||
|
||||
export default AccessibilityAssistantStatsIssueResovledBYCategory;
|
|
@ -1,7 +1,6 @@
|
|||
import Box from '@elementor/ui/Box';
|
||||
import Typography from '@elementor/ui/Typography';
|
||||
import { styled } from '@elementor/ui/styles';
|
||||
import { useTheme } from '@emotion/react';
|
||||
import { styled, useTheme } from '@elementor/ui/styles';
|
||||
import PropTypes from 'prop-types';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
|
||||
|
@ -17,8 +16,8 @@ const StatsPieChart = ({
|
|||
return (
|
||||
<StyledProgressCircle
|
||||
background={`
|
||||
radial-gradient(closest-side, white 79%, transparent 80% 100%),
|
||||
conic-gradient(${theme.palette.success.light} 0%, #f3f3f4 0)
|
||||
radial-gradient(closest-side, white 77%, transparent 78% 100%),
|
||||
conic-gradient(#10b981 0%, #f3f3f4 0)
|
||||
`}
|
||||
>
|
||||
<StyledEmptyStateValue variant="h4" as="span">
|
||||
|
@ -43,7 +42,7 @@ const StatsPieChart = ({
|
|||
}
|
||||
|
||||
const background = `
|
||||
radial-gradient(closest-side, white 79%, transparent 80% 100%),
|
||||
radial-gradient(closest-side, white 77%, transparent 78% 100%),
|
||||
conic-gradient(${sectorColor} ${firstSectorPercentage}%, #f3f3f4 0)
|
||||
`;
|
||||
|
||||
|
@ -57,7 +56,7 @@ const StatsPieChart = ({
|
|||
return (
|
||||
<StyledProgressCircle
|
||||
as="div"
|
||||
background={`radial-gradient(closest-side, white 79%, transparent 80% 100%), conic-gradient(
|
||||
background={`radial-gradient(closest-side, white 77%, transparent 78% 100%), conic-gradient(
|
||||
#064E3B 0% ${firstSectorPercentage}%,
|
||||
#10b981 ${firstSectorPercentage}% ${firstSectorPercentage + secondSectorPercentage}%,
|
||||
#a7f3d0 ${firstSectorPercentage + secondSectorPercentage}% 100%
|
||||
|
@ -86,6 +85,7 @@ const StyledProgressCircle = styled(Box)`
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 100%;
|
||||
margin-right: ${({ theme }) => theme.spacing(0.5)};
|
||||
|
||||
background: ${({ background }) => background};
|
||||
`;
|
||||
|
|
|
@ -54,13 +54,21 @@ export const StyledStatementPaper = styled(Paper)`
|
|||
`;
|
||||
|
||||
export const StyledStatementContainer = styled(Container)`
|
||||
overflow: auto;
|
||||
max-height: 100%;
|
||||
padding: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
gap: 16px;
|
||||
gap: ${({ theme }) => theme.spacing(2)};
|
||||
overflow: auto;
|
||||
max-height: 100%;
|
||||
max-width: 1200px;
|
||||
width: 100%;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
|
||||
@media (min-width: ${({ theme }) => theme.breakpoints.values.sm}px) {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
`;
|
||||
|
||||
export const StyledCardContent = styled(CardContent)`
|
||||
|
|
|
@ -94,7 +94,7 @@ class Module extends Module_Base {
|
|||
EA11Y_VERSION
|
||||
);
|
||||
|
||||
Utils\Assets::enqueue_app_assets( 'admin' );
|
||||
Utils\Assets::enqueue_app_assets( 'admin', true, [ 'wp-util', 'wp-block-editor', 'wp-components' ] );
|
||||
|
||||
wp_localize_script(
|
||||
'admin',
|
||||
|
@ -104,6 +104,7 @@ class Module extends Module_Base {
|
|||
'planData' => Settings::get( Settings::PLAN_DATA ),
|
||||
'planScope' => Settings::get( Settings::PLAN_SCOPE ),
|
||||
'pluginEnv' => self::get_plugin_env(),
|
||||
'pluginVersion' => EA11Y_VERSION,
|
||||
'widgetUrl' => WidgetModule::get_widget_url(),
|
||||
'adminUrl' => admin_url(),
|
||||
'isUrlMismatch' => ! Connect_Utils::is_valid_home_url(),
|
||||
|
@ -525,6 +526,17 @@ class Module extends Module_Base {
|
|||
return wp_remote_get( $url );
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide all admin notices on the settings page
|
||||
*/
|
||||
public function hide_admin_notices() {
|
||||
$current_screen = get_current_screen();
|
||||
if ( $current_screen && $current_screen->id === self::SETTING_PAGE_SLUG ) {
|
||||
remove_all_actions( 'admin_notices' );
|
||||
remove_all_actions( 'all_admin_notices' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Module constructor.
|
||||
*/
|
||||
|
@ -538,7 +550,9 @@ class Module extends Module_Base {
|
|||
add_action( 'rest_api_init', [ $this, 'register_settings' ] );
|
||||
add_action( 'on_connect_' . Config::APP_PREFIX . '_connected', [ $this, 'on_connect' ] );
|
||||
add_action( 'current_screen', [ $this, 'check_plan_data' ] );
|
||||
add_action( 'admin_head', [ $this, 'hide_admin_notices' ] );
|
||||
// Register notices
|
||||
add_action( 'ea11y_register_notices', [ $this, 'register_notices' ] );
|
||||
// Removed visits quota
|
||||
// add_action( 'ea11y_register_notices', [ $this, 'register_notices' ] );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ class Quota_100 extends Notice_Base {
|
|||
} else {
|
||||
$this->conditions = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function print_js() {
|
||||
|
|
|
@ -75,6 +75,20 @@ class Cache_Compatibility {
|
|||
return $excluded_js;
|
||||
}
|
||||
|
||||
/**
|
||||
* wpml_home_url
|
||||
*
|
||||
* @param string $url
|
||||
* @return string
|
||||
*/
|
||||
public function wpml_home_url( $url ) {
|
||||
if ( defined( 'ICL_SITEPRESS_VERSION' ) ) {
|
||||
return get_site_url();
|
||||
}
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
public function __construct() {
|
||||
// WP Rocket
|
||||
add_filter( 'rocket_exclude_js', [ $this, 'exclude_widget_script_array' ] );
|
||||
|
@ -82,5 +96,7 @@ class Cache_Compatibility {
|
|||
|
||||
// LiteSpeed Cache
|
||||
add_filter( 'litespeed_optimize_js_excludes', [ $this, 'exclude_widget_script_array' ] );
|
||||
// wpml support
|
||||
add_filter( 'ally_connect_home_url', [ $this, 'wpml_home_url' ] );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
class Gutenberg_Link {
|
||||
|
||||
public function enqueue_custom_link_block_assets() {
|
||||
Assets::enqueue_app_assets( 'gutenberg-custom-link', false );
|
||||
register_block_type( 'ally/custom-link', [] );
|
||||
if ( is_admin() ) {
|
||||
Assets::enqueue_app_assets( 'gutenberg-custom-link', false );
|
||||
}
|
||||
}
|
||||
|
||||
public function enqueue_custom_link_block_frontend( $block_content ) {
|
||||
|
|
|
@ -219,7 +219,7 @@ class Module extends Module_Base {
|
|||
?>
|
||||
<script>
|
||||
const registerAllyAction = () => {
|
||||
if ( ! window?.elementorAppConfig?.hasPro ) {
|
||||
if ( ! window?.elementorAppConfig?.hasPro || ! window?.elementorFrontend?.utils?.urlActions ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
3681
package-lock.json
generated
3681
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,7 @@
|
|||
"slug": "pojo-accessibility",
|
||||
"homepage": "http://pojo.me/",
|
||||
"description": "",
|
||||
"version": "3.5.2",
|
||||
"version": "3.6.0",
|
||||
"scripts": {
|
||||
"build": "wp-scripts build",
|
||||
"start": "wp-scripts start",
|
||||
|
@ -41,7 +41,7 @@
|
|||
"dependencies": {
|
||||
"@elementor/design-tokens": "^1.1.4",
|
||||
"@elementor/icons": "^1.46.0",
|
||||
"@elementor/ui": "^1.36.0",
|
||||
"@elementor/ui": "^1.36.5",
|
||||
"@emotion/cache": "^11.14.0",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@mui/x-charts": "^7.27.0",
|
||||
|
@ -58,6 +58,7 @@
|
|||
"@wordpress/media-utils": "^5.22.0",
|
||||
"@wordpress/url": "^4.10.0",
|
||||
"clipboard-copy": "^4.0.1",
|
||||
"get-xpath": "^3.3.0",
|
||||
"html-react-parser": "^5.2.2",
|
||||
"husky": "^9.1.6",
|
||||
"mixpanel-browser": "^2.58.0",
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Description: Improve your website’s accessibility with ease. Customize capabilities such as text resizing, contrast modes, link highlights, and easily generate an accessibility statement to demonstrate your commitment to inclusivity.
|
||||
* Author: Elementor.com
|
||||
* Author URI: https://elementor.com/
|
||||
* Version: 3.5.2
|
||||
* Version: 3.6.0
|
||||
* Text Domain: pojo-accessibility
|
||||
* Domain Path: /languages/
|
||||
*/
|
||||
|
@ -15,8 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
// Legacy
|
||||
define( 'POJO_A11Y_CUSTOMIZER_OPTIONS', 'pojo_a11y_customizer_options' );
|
||||
|
||||
define( 'EA11Y_VERSION', '3.5.2' );
|
||||
define( 'EA11Y_VERSION', '3.6.0' );
|
||||
define( 'EA11Y_MAIN_FILE', __FILE__ );
|
||||
define( 'EA11Y_BASE', plugin_basename( EA11Y_MAIN_FILE ) );
|
||||
define( 'EA11Y_PATH', plugin_dir_path( __FILE__ ) );
|
||||
|
|
14
readme.txt
14
readme.txt
|
@ -4,7 +4,7 @@ Tags: Web Accessibility, Accessibility, A11Y, WCAG, Accessibility Statement
|
|||
Requires at least: 6.6
|
||||
Tested up to: 6.8
|
||||
Requires PHP: 7.4
|
||||
Stable tag: 3.5.2
|
||||
Stable tag: 3.6.0
|
||||
License: GPLv2 or later
|
||||
|
||||
Ally: Make your site more inclusive by scanning for accessibility violations, fixing them easily, and adding a usability widget and accessibility statement.
|
||||
|
@ -174,6 +174,9 @@ Yes. You can rescan a URL as often as needed. Results update each time based on
|
|||
= What are AI fixes? =
|
||||
These are smart suggestions generated by Ally to help you resolve issues more efficiently-like automatically suggesting alternative text for images. AI fixes are available only on paid plans and use credits.
|
||||
|
||||
= How can I report security bugs? =
|
||||
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team help validate, triage and handle any security vulnerabilities. [Report a security vulnerability](https://patchstack.com/database/wordpress/plugin/pojo-accessibility/vdp).
|
||||
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
|
@ -184,6 +187,15 @@ These are smart suggestions generated by Ally to help you resolve issues more ef
|
|||
5. Widget on Site: This is how the accessibility widget appears on a live website.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 3.6.0 - 2025-08-02 =
|
||||
* New: Smart color contrast remediation flow in the accessibility assistant
|
||||
* Tweak: Updated scan dashboard to show open issues and issue breakdown by category
|
||||
* Tweak: Tooltip on analytics tab encouraging tracking activation
|
||||
* Tweak: Improve accessibility column in WP admin for better user experience
|
||||
* Fix: Added WPML compatibility
|
||||
* Fix: WooCommerce AJAX conflict
|
||||
|
||||
= 3.5.2 - 2025-07-28 =
|
||||
* Tweak: Improved performance by enqueuing Assistant only when logged in
|
||||
* Fix: Admin post columns offset warning
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue