[GH-ISSUE #151] Some suggestions #95

Closed
opened 2026-05-05 11:41:11 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @Angelk90 on GitHub (May 31, 2018).
Original GitHub issue: https://github.com/kusti8/proton-native/issues/151

  1. Know the exact size of the PC screen.
    You can position it in position (x, y) app, with the possibility to put it in the middle of the screen.
  2. To be able to put a full-screen app, at the start of the app if you want.
    Intercepting the event of change.
  3. Put the app icon.
  4. Have a menu like this: https://msdn.microsoft.com/dynimg/IC724998.png
  5. Instead of using:
    render (<Home />); it would be better to use as semantics / syntax:
    Export (<Home />); to stay on the theme with the genre react, render could be confused with the definition of class rendering.
  6. Instead of using:
    <App> it would be better to use as semantics / syntax:
    <Container> or <View> to stay in theme with the genre.
    As a general rule, the App signature is used to assign the name to the class of the basic project.
  7. It would be better to maintain the initial order of the case of the names do not change to maintain the structure of the order ie change:
    import {render, Window, App} from 'proton-native'; in
    import {render, App, Window} from 'proton-native';
    Personally it would be good something like this:
    import {Export, Container, Window} from 'proton-native'; or
    import {Export, View, Window} from 'proton-native';
Originally created by @Angelk90 on GitHub (May 31, 2018). Original GitHub issue: https://github.com/kusti8/proton-native/issues/151 1) Know the exact size of the PC screen. You can position it in position `(x, y)` app, with the possibility to put it in the middle of the screen. 2) To be able to put a full-screen app, at the start of the app if you want. Intercepting the event of change. 3) Put the app icon. 4) Have a menu like this: https://msdn.microsoft.com/dynimg/IC724998.png 5) Instead of using: `render (<Home />); `it would be better to use as semantics / syntax: `Export (<Home />); `to stay on the theme with the genre react, render could be confused with the definition of class rendering. 6) Instead of using: `<App> `it would be better to use as semantics / syntax: `<Container> or <View> `to stay in theme with the genre. As a general rule, the App signature is used to assign the name to the class of the basic project. 7) It would be better to maintain the initial order of the case of the names do not change to maintain the structure of the order ie change: `import {render, Window, App} from 'proton-native'; `in `import {render, App, Window} from 'proton-native'; ` Personally it would be good something like this: `import {Export, Container, Window} from 'proton-native'; `or `import {Export, View, Window} from 'proton-native';`
Author
Owner

@mischnic commented on GitHub (May 31, 2018):

  1. Not supported by libui (https://github.com/andlabs/libui/issues/351)
  2. Have you tried to fullscreen prop of Window? "Intercepting the event of change" ?
  3. Which platform? This depends on your packaging.
  4. Submenus are currently not supported by libui, but are on the horizon.
  5. In React it's ReactDOM.render(<MyApp/>), in React Native it's AppRegistry.registerComponent(something).
    What do you mean by "render could be confused with the definition of class rendering"?
  6. App is the top level component. Where would you define an onAppQuit event otherwise? And an React Native-like View will be added in #76.
  7. Do you mean alphabetically ordering the imports in the docs/examples?
<!-- gh-comment-id:393611361 --> @mischnic commented on GitHub (May 31, 2018): 1. Not supported by libui (https://github.com/andlabs/libui/issues/351) 2. Have you tried to `fullscreen` prop of `Window`? "Intercepting the event of change" ? 3. Which platform? This depends on your packaging. 4. Submenus are currently not supported by libui, but are on the horizon. 5. In React it's `ReactDOM.render(<MyApp/>)`, in React Native it's `AppRegistry.registerComponent(something)`. What do you mean by "render could be confused with the definition of class rendering"? 6. App is the top level component. Where would you define an onAppQuit event otherwise? And an React Native-like `View` will be added in #76. 7. Do you mean alphabetically ordering the imports *in the docs/examples*?
Author
Owner

@Angelk90 commented on GitHub (May 31, 2018):

@mischnic :

  1. The problem would be only on x11, if I understood correctly?
  2. I did not know this props, where do I find all the specifications of the various elements of proton-native with the various props?
    Looking for documentation I can not find it.
    Anyway: this is what I get on win 8.1:
    screen

Well that's not what I was hoping for, there's no title bar, the three icons:
icon reduction, restore, Window onClose.
3) windows 8.1
4) I meant something like this:

extends Component {
  render () {<--- HERE
    return (...

Being that in react native when you export a class you use export public class ...
it could be a good option to use export, for example.
5) Was not it onShouldQuit?
I wanted to keep the same things just changing the name of the elements:

render => Export
App => Container or View
Window remains Window
  1. When a new project is created, the initial index, js file is:
    import {render, Window, App} from 'proton-native';
    I wanted to propose considering, for example, 5)
    import {Export, View, Window} from 'proton-native';
    because Window is the part that is more to the whole of everything, then from the one that is more external to the innermost element.

My are just suggestions. ;)

<!-- gh-comment-id:393627881 --> @Angelk90 commented on GitHub (May 31, 2018): @mischnic : 1) The problem would be only on x11, if I understood correctly? 2) I did not know this props, where do I find all the specifications of the various elements of proton-native with the various props? Looking for documentation I can not find it. Anyway: this is what I get on win 8.1: ![screen](https://user-images.githubusercontent.com/20476002/40799559-3a4a9182-650e-11e8-909a-5b92a7ba1c9a.png) Well that's not what I was hoping for, there's no title bar, the three icons: icon reduction, restore, Window onClose. 3) windows 8.1 4) I meant something like this: ``` extends Component {   render () {<--- HERE     return (... ``` Being that in react native when you export a class you use export public class ... it could be a good option to use export, for example. 5) Was not it onShouldQuit? I wanted to keep the same things just changing the name of the elements: ``` render => Export App => Container or View Window remains Window ``` 6) When a new project is created, the initial index, js file is: `import {render, Window, App} from 'proton-native';` I wanted to propose considering, for example, 5) ``import {Export, View, Window} from 'proton-native'; `` because Window is the part that is more to the whole of everything, then from the one that is more external to the innermost element. My are just suggestions. ;)
Author
Owner

@mischnic commented on GitHub (May 31, 2018):

  1. https://proton-native.js.org/#/component_APIs/window?id=fullscreen
    Works as expected on macOS.

  2. example from React Native:

// src/index.js
export class App extends Component {
  render(){
    // ...
  }
};

// index.js
import { AppRegistry } from 'react-native';
import App from './src';

AppRegistry.registerComponent('RNBoilerplate', () => App);

You still have to "render" it somewhere. And how should proton-native know which your main file is?

<!-- gh-comment-id:393631505 --> @mischnic commented on GitHub (May 31, 2018): 2. https://proton-native.js.org/#/component_APIs/window?id=fullscreen Works as expected on macOS. 4. example from React Native: ```js // src/index.js export class App extends Component { render(){ // ... } }; ``` ```js // index.js import { AppRegistry } from 'react-native'; import App from './src'; AppRegistry.registerComponent('RNBoilerplate', () => App); ``` You still have to "render" it somewhere. And how should proton-native know which your main file is?
Author
Owner

@Angelk90 commented on GitHub (May 31, 2018):

@mischnic : In fact I believe that:
  registerComponent (<App />)
be better than
  render (<App />)
in this case.

<!-- gh-comment-id:393635310 --> @Angelk90 commented on GitHub (May 31, 2018): @mischnic : In fact I believe that: `  registerComponent (<App />) ` be better than `  render (<App />) ` in this case.
Author
Owner

@Angelk90 commented on GitHub (May 31, 2018):

  1. On the window we see badly fullscreen.

P.Š.
From the documentation you can not get to the various elements.
There is no list with all the elements.

<!-- gh-comment-id:393637887 --> @Angelk90 commented on GitHub (May 31, 2018): 2) On the window we see badly fullscreen. P.Š. From the documentation you can not get to the various elements. There is no list with all the elements.
Author
Owner

@mischnic commented on GitHub (May 31, 2018):

From the documentation you can not get to the various elements.

?

bildschirmfoto 2018-05-31 um 20 53 37

<!-- gh-comment-id:393640225 --> @mischnic commented on GitHub (May 31, 2018): > From the documentation you can not get to the various elements. ? ![bildschirmfoto 2018-05-31 um 20 53 37](https://user-images.githubusercontent.com/4586894/40802076-e320f804-6514-11e8-818b-b007dfa413d0.png)
Author
Owner

@Angelk90 commented on GitHub (May 31, 2018):

Missing, in the list:
   window,
   Menu,
   Box,
   Form,
   TextInput,
   Picker,
   Button,
   Text,
....

<!-- gh-comment-id:393641010 --> @Angelk90 commented on GitHub (May 31, 2018): Missing, in the list:    window,    Menu,    Box,    Form,    TextInput,    Picker,    Button,    Text, ....
Author
Owner

@mischnic commented on GitHub (May 31, 2018):

Missing, in the list:

Have you tried scrolling down the sidebar?

<!-- gh-comment-id:393641634 --> @mischnic commented on GitHub (May 31, 2018): > Missing, in the list: Have you tried scrolling down the sidebar?
Author
Owner

@Angelk90 commented on GitHub (May 31, 2018):

@mischnic : Ops, ok. Ahah thx

<!-- gh-comment-id:393642028 --> @Angelk90 commented on GitHub (May 31, 2018): @mischnic : Ops, ok. Ahah thx
Author
Owner

@kusti8 commented on GitHub (May 31, 2018):

  1. This uses libui, so if its not implemented in libui it's not implemented here.
  2. As above, it's a prop
  3. Windows currently doesn't have packaging support but it's coming soon.
  4. Same as 1
  5. There's nothing wrong with render. Export makes less sense than render. When render gets called, it literally renders everything, which is pretty intuitive.This would also be a major breaking change. Render in React is chained also when you have a component in a component. It doesn't serve any purpose.
  6. App is very clear that it encompases the entire app, so that you can have multiple Windows. React only allows one root component, which is for App. Flexbox View support is being worked on.
  7. It really doesn't matter. It's just a list of imports, which can be customized for the user however they want.
<!-- gh-comment-id:393644585 --> @kusti8 commented on GitHub (May 31, 2018): 1. This uses libui, so if its not implemented in libui it's not implemented here. 2. As above, it's a prop 3. Windows currently doesn't have packaging support but it's coming soon. 4. Same as 1 5. There's nothing wrong with render. `Export` makes less sense than `render`. When render gets called, it literally renders everything, which is pretty intuitive.This would also be a major breaking change. Render in React is chained also when you have a component in a component. It doesn't serve any purpose. 6. App is very clear that it encompases the entire app, so that you can have multiple Windows. React only allows one root component, which is for App. Flexbox View support is being worked on. 7. It really doesn't matter. It's just a list of imports, which can be customized for the user however they want.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/proton-native#95
No description provided.