Giter Site home page Giter Site logo

Comments (9)

ronaldosc avatar ronaldosc commented on March 28, 2024

@rektdeckard , what you think? We can discuss better if needed. Or with another contributors.

from react.

rektdeckard avatar rektdeckard commented on March 28, 2024

Hey @ronaldosc , thanks for you interest in making some improvements. To address your comments in order:

I'll bring modifications for start a PR refac of the exportations in the src/index.ts, because a lot of lines repeat.

Nothing is repeated and there is no need to touch this. It is a barrel file that we generate, and should not be edited directly. Yes, there is a more concise export syntax, but we bundle and minify the library anyway. Changes here do not mean real bytes saved.

a proposal for new name of "GameController" because it more generic and I encountered "Joystick" to fit well in this case and compatible with the visual icon.

We try not to rename icons except in the case the current name causes real confusion. I don't think it is true here, so let's leave it as-is. Plus, we have another more joystick-like game controller icon planned for the next release that more accurately matches that name.

at the core\src\icons.ts I think it more comprehensible the legacy icons being presented in the list as such as this example:

I understand wanting to add changed_in here, but the data backing this file actually lives an a Google Table we use to track our Dev process, and that info isn't present in the table and would need to be baclfilled. Can you explain your use-case? If you are at this point in code, you have the library and assets already. Legacy names are still supported as aliases, so you will never have access to an icon name that is not valid, either now or in the past. Also, again, this is generated code, so not the place to put this change anyway.

from react.

ronaldosc avatar ronaldosc commented on March 28, 2024

The changed_in is only for icons that was changed when it occcurs. It's for reference and documentation.

And the pupose of changing the core\src\icons.ts some properties is for more comprehension of what it is. In the way now some of then are repeated, take a look by yourself.

from react.

ronaldosc avatar ronaldosc commented on March 28, 2024

about the two fields I've explained above:
`published_in: 1.4,
updated_in: 1.4,ยด

from react.

ronaldosc avatar ronaldosc commented on March 28, 2024

The refact in src/index.ts have a lot of repeated words.

But if you stay in a rigid position for a refactoring, I understand.

from react.

rektdeckard avatar rektdeckard commented on March 28, 2024

The source file is transpiled to much smaller code, which is the only code that is consumed when you install the library. The transpiled code is all that matters in terms of bytes, and the syntax we use in the source file does not change what the bundler will emit.

from react.

ronaldosc avatar ronaldosc commented on March 28, 2024

For comparison, with refact the index with .d.ts and map is about 43.4 KB, and the actual version emits 214.0 KB,

from react.

rektdeckard avatar rektdeckard commented on March 28, 2024

Can you show me what you are proposing, via an actual PR? I can't talk about this in the abstract. .d.ts and sourcemap files should not be of any concern; they exist only on developers machines and aren't bundled in a compiled app. And if you're using a CDN, you won't be fetching this file.

from react.

rektdeckard avatar rektdeckard commented on March 28, 2024

My guess is you mean turning exports like:

import { default as o } from "./icons/AddressBook.es.js";
import { default as t } from "./icons/AirTrafficControl.es.js";
export { 
  o as AddressBook,
  t as AirTrafficControl
};

into

export { default as AddressBook } from "./icons/AddressBook.es.js";
export { default as AirTrafficControl } from "./icons/AirTrafficControl.es.js";

Because I can't see any terser way to export everything as named, while still providing default exports in icon source files themselves. This really doesn't save many bytes at all, maybe 6 bytes per icon, plus another 10 or so bytes total for the single export statement.

from react.

Related Issues (20)

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.