Giter VIP home page Giter VIP logo

clipcc-gui's Introduction

logo

()[https://jq.qq.com/?_wv=1027&k=HCrQYsp2]

ClipCC is a powerful scratch fork which adds some useful features. And it migrates a lot of features from legacy ClipCC.

What's this

ClipCC is a powerful scratch fork which adds some useful features such as new extension system, high-quality pen, stage layout and more.

Special thanks for Ble Studio!

Useful Links

What's left to be added

  • Hide blocks
  • High-quality pen
  • JIT support
  • Blockly optimization

Building

Please note! Please make sure you have installed Git and Node.js before building.

In your own node environment/application:

yarn add https://github.com/Clipteam/clipcc-gui.git

If you want to edit/play yourself:

git clone https://github.com/Clipteam/clipcc-gui.git
cd clipcc-gui
yarn install

Open a Command Prompt or Terminal in the repository and run:

yarn start

Then go to http://localhost:8601/ - the playground outputs the default GUI component.

Developing alongside other Scratch repositories

Getting another repo to point to this code

If you wish to develop clipcc-gui alongside other scratch repositories that depend on it, you may wish to have the other repositories use your local clipcc-gui build instead of fetching the current production version of the clipcc-gui that is found by default using yarn install.

Here's how to link your local clipcc-gui code to another project's node_modules/clipcc-gui.

Configuration

  1. In your local clipcc-gui repository's top level:

    1. Make sure you have run yarn install
    2. Build the dist directory by running BUILD_MODE=dist yarn run build
    3. Establish a link to this repository by running yarn link
  2. From the top level of each repository (such as scratch-www) that depends on clipcc-gui:

    1. Make sure you have run yarn install
    2. Run yarn link clipcc-gui
    3. Build or run the repositoriy

Using yarn run watch

Instead of BUILD_MODE=dist yarn run build, you can use BUILD_MODE=dist yarn run watch instead. This will watch for changes to your clipcc-gui code, and automatically rebuild when there are changes. Sometimes this has been unreliable; if you are having problems, try going back to BUILD_MODE=dist yarn run build until you resolve them.

Oh no! It didn't work!

If you can't get linking to work right, try:

  • Follow the recipe above step by step and don't change the order. It is especially important to run yarn install before yarn link, because installing after the linking will reset the linking.
  • Make sure the repositories are siblings on your machine's file tree, like .../.../MY_SCRATCH_DEV_DIRECTORY/clipcc-gui/ and .../.../MY_SCRATCH_DEV_DIRECTORY/scratch-www/.
  • Consistent node.js version: If you have multiple Terminal tabs or windows open for the different Scratch repositories, make sure to use the same node version in all of them.
  • If nothing else works, unlink the repositories by running yarn unlink in both, and start over.

Testing

Documentation

You may want to review the documentation for Jest and Enzyme as you write your tests.

See jest cli docs for more options.

Running tests

NOTE: If you're a Windows user, please run these scripts in Windows cmd.exe instead of Git Bash/MINGW64.

Before running any test, make sure you have run yarn install from this (clipcc-gui) repository's top level.

Main testing command

To run linter, unit tests, build, and integration tests, all at once:

yarn test

Running unit tests

To run unit tests in isolation:

yarn run test:unit

To run unit tests in watch mode (watches for code changes and continuously runs tests):

yarn run test:unit -- --watch

You can run a single file of integration tests (in this example, the button tests):

$(yarn bin)/jest --runInBand test/unit/components/button.test.jsx

Running integration tests

Integration tests use a headless browser to manipulate the actual HTML and javascript that the repo produces. You will not see this activity (though you can hear it when sounds are played!).

Note that integration tests require you to first create a build that can be loaded in a browser:

yarn run build

Then, you can run all integration tests:

yarn run test:integration

Or, you can run a single file of integration tests (in this example, the backpack tests):

$(yarn bin)/jest --runInBand test/integration/backpack.test.js

If you want to watch the browser as it runs the test, rather than running headless, use:

USE_HEADLESS=no $(yarn bin)/jest --runInBand test/integration/backpack.test.js

Troubleshooting

Ignoring optional dependencies

When running yarn install, you can get warnings about optionsl dependencies:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]

You can suppress them by adding the no-optional switch:

yarn install --no-optional

Further reading: Stack Overflow

Resolving dependencies

When installing for the first time, you can get warnings that need to be resolved:

npm WARN [email protected] requires a peer of babel-eslint@^8.0.1 but none was installed.
npm WARN [email protected] requires a peer of eslint@^4.0 but none was installed.
npm WARN [email protected] requires a peer of react-intl-redux@^0.7 but none was installed.
npm WARN [email protected] requires a peer of react-responsive@^4 but none was installed.

You can check which versions are available:

yarn view react-intl-redux@0.* version

You will need to install the required version:

yarn install  --no-optional --save-dev react-intl-redux@^0.7

The dependency itself might have more missing dependencies, which will show up like this:

user@machine:~/sources/scratch/clipcc-gui (491-translatable-library-objects)$ yarn install  --no-optional --save-dev react-intl-redux@^0.7
[email protected] /media/cuideigin/Linux/sources/scratch/clipcc-gui
├── [email protected]
└── UNMET PEER DEPENDENCY [email protected]

You will need to install those as well:

yarn install  --no-optional --save-dev react-responsive@^5.0.0

Further reading: Stack Overflow

Transitions

These are names for the action which causes a state change. Some examples are:

  • START_FETCHING_NEW,
  • DONE_FETCHING_WITH_ID,
  • DONE_LOADING_VM_WITH_ID,
  • SET_PROJECT_ID,
  • START_AUTO_UPDATING,

How transitions relate to loading states

Like this diagram of the project state machine shows, various transition actions can move us from one loading state to another:

Project state diagram

Note: for clarity, the diagram above excludes states and transitions relating to error handling.

Example

Here's an example of how states transition.

Suppose a user clicks on a project, and the page starts to load with URL https://scratch.mit.edu/projects/123456 .

Here's what will happen in the project state machine:

Project state example

  1. When the app first mounts, the project state is NOT_LOADED.
  2. The SET_PROJECT_ID redux action is dispatched (from src/lib/project-fetcher-hoc.jsx), with projectId set to 123456. This transitions the state from NOT_LOADED to FETCHING_WITH_ID.
  3. The FETCHING_WITH_ID state. In src/lib/project-fetcher-hoc.jsx, the projectId value 123456 is used to request the data for that project from the server.
  4. When the server responds with the data, src/lib/project-fetcher-hoc.jsx dispatches the DONE_FETCHING_WITH_ID action, with projectData set. This transitions the state from FETCHING_WITH_ID to LOADING_VM_WITH_ID.
  5. The LOADING_VM_WITH_ID state. In src/lib/vm-manager-hoc.jsx, we load the projectData into Scratch's virtual machine ("the vm").
  6. When loading is done, src/lib/vm-manager-hoc.jsx dispatches the DONE_LOADING_VM_WITH_ID action. This transitions the state from LOADING_VM_WITH_ID to SHOWING_WITH_ID
  7. The SHOWING_WITH_ID state. Now the project appears normally and is playable and editable.

Contact us

You can contact us by sending an email to [email protected]. We are looking forward to you feedback.

Donate

Copyright © Clipteam All rights reserved.

clipcc-gui's People

Contributors

alexcui03 avatar dependabot[bot] avatar edit-mr avatar frank-782 avatar hydrostic avatar jdev082 avatar simonshiki avatar soilzhu avatar sparrowhe avatar steve-xmh avatar zerlight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

clipcc-gui's Issues

React17分支下启用/禁用扩展会导致扩展被添加/移除两次

描述一下bug

React17分支下启用/禁用扩展会导致扩展被添加/移除两次

请叙述bug触发步骤

1.打开扩展窗口
2.启用一个扩展
3.点击返回,查看确认弹窗内容

预期的行为

与主分支行为一致

截图或视频

图片

ClipCC版本

React17分支 b202202061336

附加内容

部分积木前选择框状态问题(原版问题)及一个奇怪的报错问题(Clip CC问题)

更改

刚才跑去测试了下,在原生Scratch编辑器中也有几率出现这个问题,但不是Clip CC这样的100%出现这个问题 XD
不过Clipteam有没有能力自主修复它呢?期待


虽然无伤大雅,但我还是提出来吧,毕竟他还报错了(害怕
在点击“造型 编号/名称”和“背景 编号/名称”后可以正常在舞台显示值,但切换到“造型”或“声音”后再切换到“代码”时,积木的选择框被取消选中,但舞台上仍然正常显示。
且在勾选后控制台有2个奇怪的错误输出。

触发步骤

步骤1
首先在代码页点击相应积木前的选择框

步骤2
然后转到造型/背景或音乐,此时舞台上仍然可以正常显示

步骤3
随后返回代码页,发现选择框已取消选中,但舞台上仍然可以正常显示


设备信息

Windows 7 x86,chromium 78.0.3904

侦测模块“a的x”将公有变量视为舞台的私有变量

描述一下bug

侦测模块“a的x”(如 舞台的背景编号)将公有变量视为舞台的私有变量

请叙述bug触发步骤

建立公有变量“c”,拖拽出“a的x”,并将a设为舞台,发现x可设为“c”

预期的行为

x不可设为“c”

截图或视频

image

ClipCC版本

社区预览版、稳定版及金丝雀预览版。

附加内容

希望ClipCC添加以下功能

我希望ClipCC能添加全局函数与返回值,添加更多字体,更新文字打印系统(现有的打印系统只能显示在最下层)

这能帮助我更好地开发作品

Block添加

可不可以添加进

SHA128 MD5之类的哈希算法

最重要的是文件读写和网络交互

翻译部分访客语言勾选不显示

rt,访客语言勾选后在舞台上不显示或默认勾选不显示

步骤:点开拓展,选择翻译后默认被勾选

image

ClipCC版本:3.0.1-b202109191345

[建议]加速模式控制积木操作时应当更新舞台提示

如题。在使用加速模式控制积木开关加速模式时,开启/关闭加速模式后舞台上部分并未更新加速模式状态。建议在使用这些积木更改加速模式状态时同步更新舞台上方提示,不然用户将难以判断自己是否处于加速模式。
同时,Shift + Green Flag的开关行为也应当跟随实时状态进行调整。


设备信息

Windows 7 x86,chromium 78.0.3904

改进用户授权

程序可以有描述文件,可以在开始前描述权限并申请
在程序开始时还可以申请权限
然后只有用户允许的才可以运行否则失败
用户也可以选择单步执行,当需授权模块执行时弹出提示,进行断点
程序可以调用申请并执行在执行时发起授权申请
用户在自己的设置(离线:编辑器设置,在线:个人设置)可以设置全局的白名单,避免审批麻烦
clipteam也可以在后台设置全局白名单来帮助用户授权(可以是免授权也可以是提示安全)

无法删除变量及列表

描述一下bug

无法删除变量及列表

请叙述bug触发步骤

见视频

预期的行为

与原版一致

截图或视频

1640494647340.mp4

附加内容

仅金丝雀版有此问题,稳定版无此问题

调用功能设想

简述

添加一个调用功能,可以在1个cc3文件中使用另一个cc3文件的代码(积木块)

为什么

为什么,额,挺难回答。提出这个设想完全是因为玩了一款游戏后心中一直在想怎么模块化,如果在cilpcc中添加此功能,那么我可以把人物的移动,跳跃,行为都做成一个cc3,直接在主体中调用,看起来很美,不是吗。

细节

首先,是怎么表示,可以像“函数”选项里的积木块一样:
——————————
|
|调用(xxxxxxxxxx)
|
——————————
“xxxxxxxx”可以做成一个跟“当接收到信息xx”一样的圆形可展开列表,我也不知道怎么描述,但是你们可以去我说的积木看一看。展开列表后,可以添加一个路径,当开始后就运行那个文件。运行方式我目前有两种想法:第一,将代码复制过来,在这个程序上运行。第二,单开一个隐藏程序运行文件,然后把输出展现在舞台上。
其实本质上,这个调用功能就是一个加强(削弱?)版的函数块,所以不加此功能也无伤大雅

安全等级限制

用户可以选择自己的安全等级:
安全
普通
正常
风险
危险!!!(隐藏选项)
离线版的话可以有五个等级,最后一个等级要在风险下看得见,要打开需抄写危险警告以及用户协议
在线版的风险操作步骤为离线版的危险步骤,而危险不予提供,仅clip官方可允许他人打开
各大等级分级标准:
安全:scratch级别,无附加功能
普通:clipcc除去所有需授权功能
正常:允许运行scratchscript,需用户授权
风险:允许云数据,需用户授权
危险:全功能可用
授权建议:见此处

判断碰到的其他角色的克隆体的造型

描述一下你想要的功能

判断碰到的其他角色的克隆体的造型
如果碰到<角色>与碰到<角色>的造型=???

你为什么想要实现它?(可选)

这样我们就可以非常非常非常轻松地实现子弹功能

增加get/post模块

如题
为保证安全性可以仅开放离线编辑器使用,线上需要提前审批后使用

整个导入扩展它不香吗Isn't make a expression importing delicious?

像scratchx那样整个导入本地扩展的功能它不香吗,还可以像chrome一样整个网上应用店让用户做扩展传上去它不香吗?
Isn't making a importing local expressions like scratchx delicious?Isn't make a online expression store and let developers make expressions and upload it to the store delicious?

矢量打印

描述一下你想要的功能

能够自定义位置,颜色,字体,大小打印一串文本

你为什么想要实现它?(可选)

很多项目都可以用它实现例如Word之类的功能

鼠标按键侦测积木会引发一系列问题

描述一下bug

鼠标按键侦测积木会引发一系列的问题。
触发后,整个编辑器将会出现这些问题:

  • 积木变形、控件错位
  • 编辑区无法操作
  • 部分Clip CC新增积木无法正常删除
  • 控制台会报错

仍然不清楚原生Scratch是否有这个问题,因为原版积木暂时都不会出现这个问题。我可能会继续在原生Scratch编辑器上继续测试,如有消息我会第一时间修改(

请叙述bug触发步骤

从任意角色/舞台编辑区取出这个积木,打开下拉框设置为除left的任意选项,然后新建角色。

预期的行为

新角色编辑区正常清空。

截图或视频

触发步骤视频

ClipCC版本

未知/2020.07.06

附加内容

设备信息: Windows 7 x86,chromium 78.0.3904

带有svg的作品加载出错

描述一下bug

无法加载任何带有svg的作品,console报错getFonts is not a function

请叙述bug触发步骤

加载带有svg的作品即可复现

预期的行为

正常加载作品

截图或视频

default.mp4

ClipCC版本

3.0.0-b202105251859

附加内容

gui Unhandled Error: TypeError: getFonts is not a function
at inlineSvgFonts (http://sinangentoo.love:3601/lib.min.js:260516:15)   
at http://sinangentoo.love:3601/lib.min.js:314313:98   
at SpriteSelectorItem.getCostumeData (http://sinangentoo.love:3601/lib.min.js:307185:83)    
at SpriteSelectorItem.wrapper [as getCostumeData] (http://sinangentoo.love:3601/lib.min.js:161372:15)    
at SpriteSelectorItem.render (http://sinangentoo.love:3601/lib.min.js:307305:26)    
at finishClassComponent (http://sinangentoo.love:3601/lib.min.js:180739:31)    
at updateClassComponent (http://sinangentoo.love:3601/lib.min.js:180716:12)    
at beginWork (http://sinangentoo.love:3601/lib.min.js:181091:16)    
at performUnitOfWork (http://sinangentoo.love:3601/lib.min.js:183090:16)    
at workLoop (http://sinangentoo.love:3601/lib.min.js:183154:26)

函数内调用函数

描述一下bug

按照视频中的代码,网页会崩溃
(视频中的代码本身就有逻辑错误,应作出限制,例如函数内无法调用自身之类的。)

请叙述bug触发步骤

见视频

预期的行为

限制这种行为

截图或视频

ClipCC版本

2022-02-18.16-44-31.mp4

附加内容

全局自定义积木相关问题

描述一下bug

在项目运行时显示效果与原版出现明显不同且与全局自定义积木疑似存在联系。
(在下方示例项目中表现为NOTE消失动画与原版不一致)

请叙述bug触发步骤

对比项目在ClipCC以及原版编辑器的运行效果即可。

预期的行为

使其运行逻辑与原版一致。

截图或视频

暂无

ClipCC版本

截至2022年1月1日,金丝雀版与3.1.0-β3离线版均存在问题。

附加内容

项目地址:Scratch - CLIMAX-CORE

列表名称显示为左对齐

描述一下bug

列表名称显示为左对齐

请叙述bug触发步骤

建立一个名称不多于两个字符的列表

预期的行为

列表名称显示为居中

截图或视频

image

ClipCC版本

社区预览版、稳定版及金丝雀开发版

附加内容

添加暂停按钮

描述一下你想要的功能

添加类似于turbowarp的暂停按钮

你为什么想要实现它?(可选)

这样调试时可以让程序暂停然后再写代码,更加方便

角色选择器无法正常排序

描述一下bug

角色选择器无法正常排序

请叙述bug触发步骤

新建一个角色,然后在角色选择器中拖动,经测试造型和声音选项卡也存在这个问题。

预期的行为

可以正常拖动并排序

截图或视频

image
image

ClipCC版本

3.1.1-af0b4df-b202203130241(https://codingclip.com/editor/canary/)

附加内容

JSON扩展出现问题

描述一下bug

JSON扩展的键值设置模块第三个输入框无法输入。

请叙述bug触发步骤

1.添加JSON扩展

预期的行为

模块能够正常使用

截图或视频

image

ClipCC版本

3.0(官方预览站)

附加内容

命名空间

描述一下你想要的功能

例如C++的命名空间
新建一个命名空间,里面有一个个函数,函数调用后返回一个值
小明.成绩 返回96
小明.身高 返回127

你为什么想要实现它?(可选)

新建变量后无法在“代码”区进行操作

描述一下bug

新建变量后无法在“代码”区进行操作

请叙述bug触发步骤

见视频

预期的行为

与原版一致

截图或视频

1640446957981.mp4

ClipCC版本

202112260003 最新金丝雀

附加内容

稳定版无此问题

将自定义函数作为参数时无法传入另一个自定义函数

描述一下bug

将自定义函数作为参数时无法传入另一个自定义函数

请叙述bug触发步骤

1.创建两个返回值积木,其中一个要求有参数
2.将其中一个返回值嵌入到另外一个积木中执行

预期的行为

能够同原版Reporter一样正常运行

截图或视频

Filmage.2022-02-02_121515.mp4

ClipCC版本

最新预览

附加内容

暗色模式配色问题

描述一下bug

黑暗模式下舞台右键弹出的变量更改列表文字为黑色

请叙述bug触发步骤

见视频

预期的行为

文字为白色

截图或视频

1640493564854.mp4

附加内容

稳定版、金丝雀版均有此问题

新插件:文件操作插件

描述一下你想要的功能

文件操作插件,可以操作本地文件
写入文件(目录)
读取文件(目录)
取当前sb3目录

你为什么想要实现它?(可选)

可以让存档不依赖存档码、云变量,吧玩家存档写入到一个dat文件,旗帜运行时读入,非常轻松的实现存档功能

加载带有扩展模块内容的sb2文件有几率造成编辑器崩溃

描述一下bug

加载带有扩展模块内容的sb2文件会造成编辑器崩溃,不包括所有扩展,等待进一步测试

请叙述bug触发步骤

1.选择一个带扩展的sb2文件并打开它
2.编辑器打开一会后就报错了

预期的行为

能够正常打开

截图或视频

暂无

ClipCC版本

最新编译版

附加内容

希望添加自定义舞台大小

描述一下你想要的功能

希望添加自定义舞台大小

你为什么想要实现它?(可选)

他让我们更方便地为手机制作程序、适应大屏潮流

无法将造型和声音在角色间移动

描述一下bug

造型和声音在角色间移动无效

请叙述bug触发步骤

在角色间移动造型和声音

预期的行为

可以移动

截图或视频

见评论区

ClipCC版本

社区预览版和金丝雀版,稳定版无此问题。

附加内容

无法修改函数名

描述一下bug

无法修改函数名

请叙述bug触发步骤

无法修改函数名,

预期的行为

与原版一致

截图或视频

见下

附加内容

仅金丝雀版有此问题,稳定版无此问题

1640517594467.mp4

在 右键 变量圆形块 时 如果空间不足 会 直接裁去右键菜单 超过变量圆形块的部分 并且 不给滚动条

描述一下bug

在 右键 变量圆形块 时 如果空间不足 会 直接裁去右键菜单 超过变量圆形块的部分 并且 不给滚动条

请叙述bug触发步骤

首先创建多个(最好是10个以上)的变量,然后将任意变量圆形块放在编辑界面上方,让其右键菜单无法完全显示,随后右键此变量圆形块。

预期的行为

将右键菜单移动到可完全显示的位置或添加滚动条

截图或视频

ClipCC版本

3.1.1-b202202081254

附加内容

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.