[openstack-dev] [horizon][xstatic]How to handle xstatic if upstream files are modified

Xinni Ge xinni.ge1990 at gmail.com
Tue Apr 10 06:08:30 UTC 2018


Hi Radomir, Ivan,

Thanks a lot for your advice.
I will update the xstatic files just as the upstream.
As for the customized lines, I will try to find a better way to solve it,
maybe override the original functions inside the project.

Best regards,
Xinni

On Tue, Apr 10, 2018 at 4:58 AM, Ivan Kolodyazhny <e0ne at e0ne.info> wrote:

> Hi, Xinni,
>
> I absolutely agree with Radomir. We should keep xstatic files without
> modifications. We don't know if they are used outside of OpenStack or not,
> so they should be the same as NPM packages
>
>
> Regards,
> Ivan Kolodyazhny,
> http://blog.e0ne.info/
>
> On Mon, Apr 9, 2018 at 12:32 PM, Radomir Dopieralski <
> openstack at sheep.art.pl> wrote:
>
>> The whole idea about xstatic files is that they are generic, not specific
>> to Horizon or OpenStack, usable by other projects that need those static
>> files. In fact, at the time we started using xstatic, it was being used by
>> the MoinMoin wiki project (which is now dead, sadly). The modifications you
>> made are very specific to your usecase and would make it impossible to
>> reuse the packages by other applications (or even by other Horizon
>> plugins). The whole idea of a library is that you are using it as it is
>> provided, and not modifying it.
>>
>> We generally try to use all the libraries as they are, and if there are
>> any modifications necessary, we push them upstream, to the original
>> library. Otherwise there would be quite a bit of maintenance overhead
>> necessary to keep all our downstream patches. When considerable
>> modification is necessary that can't be pushed upstream, we fork the
>> library either into its own repository, or include it in the repository of
>> the application that is using it.
>>
>> On Mon, Apr 9, 2018 at 2:54 AM, Xinni Ge <xinni.ge1990 at gmail.com> wrote:
>>
>>> Hello, team.
>>>
>>> Sorry for talking about xstatic repo for so many times.
>>>
>>> I didn't realize xstatic repositories should be provided with exactly
>>> the same file as upstream, and should have talked about it at very first.
>>>
>>> I modified several upstream files because some of them files couldn't be
>>> used directly under my expectation.
>>>
>>> For example,  {{ }} are used in some original files as template tags,
>>> but Horizon adopts {$ $} in angular module, so I modified them to be
>>> recognized properly.
>>>
>>> Another major modification is that css files are converted into scss
>>> files to solve some css import issue previously.
>>> Besides, after collecting statics, some png file paths in css cannot be
>>> referenced properly and shown as 404 errors, I also modified css itself to
>>> handle this issues.
>>>
>>> I will recheck all the un-matched xstatic repositories and try to
>>> replace with upstream  files as much as I can.
>>> But I if I really have to modify some original files, is it acceptable
>>> to still use it as embedded files with license info appeared at the top?
>>>
>>>
>>> Best Regards,
>>> Xinni Ge
>>>
>>> ____________________________________________________________
>>> ______________
>>> OpenStack Development Mailing List (not for usage questions)
>>> Unsubscribe: OpenStack-dev-request at lists.op
>>> enstack.org?subject:unsubscribe
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>>
>>>
>>
>> ____________________________________________________________
>> ______________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscrib
>> e
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
Best Regards,
Xinni Ge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180410/8b216dde/attachment.html>


More information about the OpenStack-dev mailing list